Secure Coding Engineer
Write code attackers cannot quote: parameterized queries, output encoding, CSRF tokens, deserialization guards, and CSP headers that actually enforce.
Path overview
安全编码的核心动作只有一个:永远不把数据当代码执行。本路径沿注入类漏洞的家族谱系展开——SQL、XSS、命令、路径、反序列化,每类都给出结构性防御,再落地参数化重构与 CSP 配置,收尾于参数化查询练习。
Secure coding has one core move: never treat data as code. This path walks the injection family — SQL, XSS, command, path, deserialization — with structural defenses, CSP, and practice.
Compare "Why concatenation fails" with "Convert the common case" in "How to Refactor to Parameterized Queries" and state which trade-off you would accept in security code.
Next step: Add a Content Security Policy with Nonces
⏱ 1h
Execute "Add a Content Security Policy with Nonces" end to end, then repeat the last step with one parameter changed and compare "Generate a cryptographically random nonce per response and expose it to the template".
Prerequisites: How to Refactor to Parameterized Queries
Next step: Helmet
⏱ 0.5h
Wire "Helmet" into a scratch security project, following "contentSecurityPolicy helmet.contentSecurityPolicy({ directives })", and record one working request/response pair.
Prerequisites: Add a Content Security Policy with Nonces
Next step: SQL Parameterized Queries
⏱ 1h
Implement "SQL Parameterized Queries" so that Safe query results yields safe query, including the edge case in the second sample.
Prerequisites: Helmet
Next step: Capstone: Secure Coding Engineer
⏱ 0.5h
Deliver the "Build an Input Sanitizer Service" blueprint with "Schema validator" working and "HTML stripper" recorded as evidence.
Prerequisites: SQL Parameterized Queries
Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.
⏱ 4h