{
  "slug": "secure-development",
  "topic": "Secure development",
  "status": "published",
  "order": 21,
  "capability": "software/secure-development",
  "title": "Secure development: which practices prevent vulnerabilities, and can you prove it?",
  "short": "Publish a disclosure policy, block secrets at push and fix reported flaws within 90 days, or 7 if exploited.",
  "answer": "This quarter, publish a vulnerability disclosure policy with a security.txt contact, block secrets at push and make review plus one precise static analysis check required before merge. Judge every other practice by whether it removes a whole class of bug by default or leaves evidence that a customer or regulator can check.",
  "audience": "Engineering leads, product security teams and developers who build and run their own software, from small product teams to regulated enterprises",
  "version": "1.2",
  "lastReviewed": "2026-11-05",
  "reviewEveryDays": 30,
  "blocks": [
    {
      "type": "ranked",
      "id": "first",
      "title": "If you only do five things",
      "navTitle": "Five things",
      "items": [
        {
          "title": "Publish a disclosure policy and a contact.",
          "text": "Authorize good-faith testing, rule out legal action against it, give a reporting channel and allow coordinated publication[^pledge]. Serve `/.well-known/security.txt` with `Contact`, `Policy` and an `Expires` date under a year away[^rfc9116]. From December 2027, the CRA requires a disclosure policy and a contact address[^cra]."
        },
        {
          "title": "Make the safe way the default way.",
          "text": "Cross-site scripting and SQL injection top the 2025 CWE Top 25[^cwe]. Offer parameterized queries, auto-escaping templates and shell-free command APIs[^pledge][^badprac]. Write new components in memory-safe languages: memory safety bugs fell below 20% of Android's vulnerabilities in 2025[^android]."
        },
        {
          "title": "Block secrets before they reach the repository.",
          "text": "Turn on push protection everywhere. On GitHub, private repositories need Secret Protection for it[^ghpush]; on GitLab, it takes Ultimate[^glpush]. Rotate leaked secrets at once[^ghss], and load secrets from a secret manager, not code, images or environment variables[^owaspsec]."
        },
        {
          "title": "Require review and one precise scanner before merge.",
          "text": "On the default branch, require a pull request with one approval, **Require approval of the most recent reviewable push** and passing checks[^rules]. Run CodeQL's `default` suite[^cqlsuites] and block high and critical alerts with **Require code scanning results**[^mergeprot]."
        },
        {
          "title": "Fix by exploitation and publish what you fixed.",
          "text": "Ship fixes within 90 days of a report, or 7 once exploited, per Google Project Zero[^p0]. Issue a CVE with CWE and CPE for each critical or high flaw that's exploited or that users must patch[^pledge]."
        }
      ]
    },
    {
      "type": "steps",
      "id": "reports",
      "title": "Handle a vulnerability report",
      "navTitle": "Handle a report",
      "items": [
        {
          "title": "Is it real?",
          "text": "Acknowledge it within three business days and reproduce it before anyone spends a week. Expect volume: by April, curl got twice 2025's rate of reports, nearly all AI-assisted, and 15 to 16% were confirmed[^curl]."
        },
        {
          "title": "Is it exploited?",
          "text": "Check CISA KEV, ENISA's EU KEV catalog[^enisavd] and your own logs. If it is and the product is on the EU market, send an early warning through ENISA's platform within 24 hours[^cra][^srp]. The EU security laws sheet has the later clocks."
        },
        {
          "title": "When does the fix ship?",
          "text": "Set the date by exploitation and exposure, then severity, and tell the reporter. On internet-facing services you run, an exploited flaw gets the patching sheet's 72 hours. If the fix will take longer, publish a workaround first[^ssdf]. Ship security fixes separately from feature updates where feasible, as the CRA requires[^cra]."
        },
        {
          "title": "What do you publish?",
          "text": "An advisory with a CVE, a CVSS score and a CWE, crediting the reporter. NVD no longer routinely adds its own score where the CNA gave one[^nvd], so your record is what customers see."
        },
        {
          "title": "Where else is the same bug?",
          "text": "Search for the pattern across the code base, add a regression test and a rule that catches the next one, as the SSDF advises[^ssdf]. The TypeScript, Rust and Python sheets list rules per language."
        }
      ]
    },
    {
      "type": "list",
      "id": "checks",
      "title": "Automated checks that earn their place",
      "navTitle": "Automated checks",
      "items": [
        "**Secret scanning with push protection.** It covers Git history, issues and pull requests, and validity checks show which secrets still work[^ghss].",
        "**Dependency scanning.** If a KEV-listed flaw in a component is exploitable in your product, CISA wants a free patch within 30 days of its fix[^badprac].",
        "**SAST with a precise rule set.** Start with CodeQL's `default` suite, not the less precise `security-extended`[^cqlsuites]. Each month, tune out rules that are mostly false positives.",
        "**A DAST baseline in CI.** ZAP's baseline scan spiders for a minute and doesn't attack, so it can run against production[^zap].",
        "**Tests for what tools miss.** Tools can't fully verify access control[^asvsassess], the top risk in the OWASP Top 10:2025[^top10]. Test that one user can't reach another's records."
      ]
    },
    {
      "type": "list",
      "id": "design",
      "title": "Before a risky change ships",
      "navTitle": "Risky changes",
      "items": [
        "**Decide what counts as risky.** Authentication, authorization, payments, uploads, parsers and new interfaces get a threat model and a reviewer who knows security. The NCSC wants closer oversight of AI-written code that handles authentication, sensitive personal data or secrets[^ncscvibe].",
        "**Threat model it in half an hour.** Ask what you're working on, what can go wrong, what you'll do about it and whether you did a good enough job, with STRIDE's six categories as prompts[^owasptm]. Keep the answers with the code.",
        "**Pick requirements from ASVS 5.0.** Level 1 holds about 20% of some 350 requirements, and most applications should aim for Level 2[^asvs]. Cite them with the version, as in `v5.0.0-1.2.5`[^asvs].",
        "**Ship secure defaults.** No shared default passwords, MFA on for admins and logs for customers[^badprac]. The CRA requires a secure default configuration and a reset[^cra]."
      ]
    },
    {
      "type": "list",
      "id": "evidence",
      "title": "Evidence customers and regulators ask for",
      "navTitle": "Evidence",
      "items": [
        "**Answers to buyers' standard questions.** CISA's Secure by Demand guide tells buyers to ask for a disclosure policy, CVEs with CWE and CPE fields, a plan to end vulnerability classes, an SBOM and MFA by default[^demand].",
        "**A mapping to SSDF 1.1.** Name the task each practice meets, such as PW.7.2 for code review[^ssdf]. US agencies may still ask for the attestation form, though it's no longer required[^omb].",
        "**CRA technical documentation.** Keep the risk assessment current and the documentation for 10 years or the support period, if longer. SaaS that isn't remote data processing for a product is outside the CRA[^cra]."
      ]
    },
    {
      "type": "list",
      "id": "changed",
      "title": "What changed in 2026",
      "navTitle": "What changed",
      "items": [
        "**CRA reporting started.** Since 11 September, manufacturers must report actively exploited vulnerabilities through ENISA's platform[^srp]. The Commission's draft guidance of 27 July explains scope, remote data processing and support periods[^craguide].",
        "**AI finds flaws at scale.** The NCSC expects a forced correction of technical debt and an influx of updates of every severity[^ncscwave]. Plan who fixes the findings before you scan with a model.",
        "**EU vendors can issue CVEs under ENISA.** ENISA, a CVE Root since November 2025, had 20 CNAs by August, vendors among them[^enisacna]."
      ]
    },
    {
      "type": "list",
      "id": "skip",
      "title": "What you can skip",
      "items": [
        "**A paid bug bounty before you can triage.** curl ended its bounty in early 2026 after a flood of AI-written junk reports[^curl]. A disclosure policy is free.",
        "**Black-box penetration tests.** OWASP favors source-led tests, and it certifies no one for ASVS[^asvsassess].",
        "**Rewriting history after a leak.** Revoke the secret. GitHub calls scrubbing history time-consuming and often unnecessary[^ghss].",
        "**Waiting for SSDF 1.2.** NIST's December 2025 draft adds continuous improvement and staged updates with rollback[^ssdf12]. Map to 1.1 now."
      ]
    },
    {
      "type": "list",
      "id": "mistakes",
      "title": "Mistakes that cost the most",
      "navTitle": "Mistakes",
      "items": [
        "**Fixing silently.** Customers can't tell they need the update, and the CRA requires public information on fixed vulnerabilities[^cra].",
        "**Letting security.txt expire.** `Expires` is required[^rfc9116]. Put its renewal in the release calendar.",
        "**Merging AI-written code nobody read.** Review, understand and check it where the stakes are high[^ncscvibe]. Require approval from someone other than the person who prompted the agent."
      ]
    },
    {
      "type": "columns",
      "id": "by-size",
      "title": "What this looks like at your size",
      "navTitle": "By team size",
      "span": "full",
      "columns": [
        {
          "title": "Small team, no security staff",
          "items": [
            "Turn on Dependabot, push protection and CodeQL. Private GitHub repos need the Team plan or higher, with paid Secret Protection and Code Security[^ghpush][^rules].",
            "Publish security.txt with a mailbox two people read, and require one review before merge.",
            "Keep one list of open flaws with ship dates."
          ]
        },
        {
          "title": "Growing, with IT or security staff",
          "items": [
            "Name a product security owner and write playbooks for zero-days and exploited flaws[^ssdf].",
            "Threat model risky changes and take ASVS Level 2 for internet-facing apps.",
            "Add a ZAP baseline scan against staging and report time to fix monthly."
          ]
        },
        {
          "title": "Enterprise or regulated",
          "items": [
            "Become a CNA, under ENISA's Root if it covers you[^enisacna], and publish CVEs with CWE and CPE.",
            "Keep CRA technical documentation per product, with risk assessment and vulnerability records.",
            "Fork ASVS into an internal standard naming your approved libraries[^asvs]."
          ]
        }
      ]
    }
  ],
  "changes": [
    {
      "date": "2026-11-05",
      "version": "1.2",
      "text": "Clarified that the CRA requires a disclosure policy and a contact address, not security.txt as such."
    },
    {
      "date": "2026-11-05",
      "version": "1.1",
      "text": "Reviewed for company readers: private GitHub repositories need the Team plan or higher for these checks."
    },
    {
      "date": "2026-11-04",
      "version": "1.0",
      "text": "Published after a copy edit and a source-by-source fact check, which updated the curl figures and narrowed 12 statements to what the sources say."
    },
    {
      "date": "2026-11-04",
      "version": "0.1",
      "text": "First draft, based on NIST SSDF, CISA Secure by Design, OWASP ASVS 5.0, the CRA, RFC 9116, NCSC guidance and GitHub docs."
    }
  ],
  "sources": [
    {
      "id": "pledge",
      "title": "Secure by Design Pledge",
      "publisher": "CISA",
      "date": "checked 4 Nov 2026",
      "url": "https://www.cisa.gov/securebydesign/pledge"
    },
    {
      "id": "rfc9116",
      "title": "RFC 9116: security.txt",
      "publisher": "IETF",
      "date": "Apr 2022",
      "url": "https://www.rfc-editor.org/rfc/rfc9116.html"
    },
    {
      "id": "cra",
      "title": "Regulation (EU) 2024/2847 (Cyber Resilience Act), Articles 3, 13, 14 and 71, recital 12 and Annex I",
      "publisher": "EUR-Lex",
      "date": "2024",
      "url": "https://eur-lex.europa.eu/eli/reg/2024/2847/oj"
    },
    {
      "id": "cwe",
      "title": "2025 CWE Top 25",
      "publisher": "MITRE",
      "date": "updated 15 Dec 2025",
      "url": "https://cwe.mitre.org/top25/archive/2025/2025_cwe_top25.html"
    },
    {
      "id": "badprac",
      "title": "Product Security Bad Practices v2",
      "publisher": "CISA and FBI",
      "date": "17 Jan 2025",
      "url": "https://www.cisa.gov/resources-tools/resources/product-security-bad-practices"
    },
    {
      "id": "android",
      "title": "Rust in Android: move fast and fix things",
      "publisher": "Google",
      "date": "13 Nov 2025",
      "url": "https://blog.google/security/rust-in-android-move-fast-fix-things/"
    },
    {
      "id": "ghss",
      "title": "Secret scanning",
      "publisher": "GitHub Docs",
      "date": "checked 4 Nov 2026",
      "url": "https://docs.github.com/en/code-security/concepts/secret-security/secret-scanning"
    },
    {
      "id": "ghpush",
      "title": "About GitHub Advanced Security",
      "publisher": "GitHub Docs",
      "date": "checked 4 Nov 2026",
      "url": "https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security"
    },
    {
      "id": "glpush",
      "title": "Secret push protection",
      "publisher": "GitLab Docs",
      "date": "checked 4 Nov 2026",
      "url": "https://docs.gitlab.com/user/application_security/secret_detection/secret_push_protection/"
    },
    {
      "id": "owaspsec",
      "title": "Secrets Management Cheat Sheet",
      "publisher": "OWASP",
      "date": "checked 4 Nov 2026",
      "url": "https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html"
    },
    {
      "id": "rules",
      "title": "Available rules for rulesets",
      "publisher": "GitHub Docs",
      "date": "checked 4 Nov 2026",
      "url": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets"
    },
    {
      "id": "cqlsuites",
      "title": "CodeQL query suites",
      "publisher": "GitHub Docs",
      "date": "checked 4 Nov 2026",
      "url": "https://docs.github.com/en/code-security/concepts/code-scanning/codeql/codeql-query-suites"
    },
    {
      "id": "mergeprot",
      "title": "Set code scanning merge protection",
      "publisher": "GitHub Docs",
      "date": "checked 4 Nov 2026",
      "url": "https://docs.github.com/en/code-security/how-tos/find-and-fix-code-vulnerabilities/manage-your-configuration/set-merge-protection"
    },
    {
      "id": "p0",
      "title": "Vulnerability Disclosure Policy",
      "publisher": "Google Project Zero",
      "date": "checked 4 Nov 2026",
      "url": "https://projectzero.google/vulnerability-disclosure-policy.html"
    },
    {
      "id": "curl",
      "title": "High-Quality Chaos",
      "publisher": "Daniel Stenberg (curl)",
      "date": "22 Apr 2026",
      "url": "https://daniel.haxx.se/blog/2026/04/22/high-quality-chaos/"
    },
    {
      "id": "enisavd",
      "title": "Vulnerability Services",
      "publisher": "ENISA",
      "date": "checked 4 Nov 2026",
      "url": "https://www.enisa.europa.eu/topics/vulnerability-services"
    },
    {
      "id": "enisacna",
      "title": "ENISA scales up its role in the CVE Program",
      "publisher": "ENISA",
      "date": "6 Aug 2026",
      "url": "https://www.enisa.europa.eu/news/enisa-scales-up-its-role-in-the-cve-program"
    },
    {
      "id": "srp",
      "title": "The CRA Single Reporting Platform is launched",
      "publisher": "ENISA",
      "date": "11 Sep 2026",
      "url": "https://www.enisa.europa.eu/news/the-cra-single-reporting-platform-is-launched"
    },
    {
      "id": "nvd",
      "title": "NIST Updates NVD Operations to Address Record CVE Growth",
      "publisher": "NIST",
      "date": "15 Apr 2026",
      "url": "https://www.nist.gov/node/1910421"
    },
    {
      "id": "ssdf",
      "title": "SP 800-218, SSDF Version 1.1",
      "publisher": "NIST",
      "date": "Feb 2022",
      "url": "https://csrc.nist.gov/pubs/sp/800/218/final"
    },
    {
      "id": "zap",
      "title": "ZAP Baseline Scan",
      "publisher": "ZAP Docs",
      "date": "checked 4 Nov 2026",
      "url": "https://www.zaproxy.org/docs/docker/baseline-scan/"
    },
    {
      "id": "asvsassess",
      "title": "ASVS 5.0.0: Assessment and Certification",
      "publisher": "OWASP",
      "date": "30 May 2025",
      "url": "https://github.com/OWASP/ASVS/blob/v5.0.0/5.0/en/0x04-Assessment_and_Certification.md"
    },
    {
      "id": "top10",
      "title": "OWASP Top 10:2025, Introduction",
      "publisher": "OWASP",
      "date": "2025",
      "url": "https://top10.owasp.org/2025/0x00_2025-Introduction/"
    },
    {
      "id": "ncscvibe",
      "title": "The 'vibe coding spectrum' approach to AI-assisted software development",
      "publisher": "NCSC (UK)",
      "date": "18 Jun 2026",
      "url": "https://www.ncsc.gov.uk/blogs/the-vibe-coding-spectrum-approach-to-ai-assisted-software-development"
    },
    {
      "id": "owasptm",
      "title": "Threat Modeling Cheat Sheet",
      "publisher": "OWASP",
      "date": "checked 4 Nov 2026",
      "url": "https://cheatsheetseries.owasp.org/cheatsheets/Threat_Modeling_Cheat_Sheet.html"
    },
    {
      "id": "asvs",
      "title": "ASVS 5.0.0: What is the ASVS",
      "publisher": "OWASP",
      "date": "30 May 2025",
      "url": "https://github.com/OWASP/ASVS/blob/v5.0.0/5.0/en/0x03-What-is-the-ASVS.md"
    },
    {
      "id": "demand",
      "title": "Secure by Demand Guide",
      "publisher": "CISA and FBI",
      "date": "Aug 2024",
      "url": "https://www.cisa.gov/resources-tools/resources/secure-demand-guide"
    },
    {
      "id": "omb",
      "title": "M-26-05: Adopting a Risk-based Approach to Software and Hardware Security",
      "publisher": "OMB",
      "date": "23 Jan 2026",
      "url": "https://www.whitehouse.gov/wp-content/uploads/2026/01/M-26-05-Adopting-a-Risk-based-Approach-to-Software-and-Hardware-Security.pdf"
    },
    {
      "id": "craguide",
      "title": "Commission guidance on the application of the CRA, C(2026) 5252",
      "publisher": "European Commission",
      "date": "27 Jul 2026",
      "url": "https://digital-strategy.ec.europa.eu/en/library/commission-publishes-new-guidance-support-timely-cyber-resilience-act-implementation"
    },
    {
      "id": "ncscwave",
      "title": "Preparing for a 'vulnerability patch wave'",
      "publisher": "NCSC (UK)",
      "date": "1 May 2026",
      "url": "https://www.ncsc.gov.uk/blogs/prepare-for-vulnerability-patch-wave"
    },
    {
      "id": "ssdf12",
      "title": "SP 800-218 Rev. 1, SSDF Version 1.2 (draft)",
      "publisher": "NIST",
      "date": "17 Dec 2025",
      "url": "https://csrc.nist.gov/pubs/sp/800/218/r1/ipd"
    }
  ]
}