Introduction
In response to increasingly sophisticated AI security scanning tools, such as Anthropic's Mythos, some organizations—including the UK's National Health Service (NHS)—have considered closing their open source repositories. However, such a drastic step undermines the benefits of transparency, community collaboration, and innovation that open source provides. This guide outlines a step-by-step approach to safeguarding your code while maintaining open access, without sacrificing security.

What You Need
- Complete inventory of all public and private repositories
- Cross-functional security and development team
- Access to AI-driven vulnerability scanners (e.g., Mythos, CodeQL, Snyk)
- Existing open source policy or organizational guidelines
- Responsible disclosure policy template
- Version control system (e.g., GitHub, GitLab)
Step-by-Step Guide
Step 1: Conduct a Thorough Risk Assessment for Each Repository
Not all repositories pose the same security risk. As evidenced by NHS datasets, internal tools, and front-end design code, many repos contain no sensitive logic or credentials. Start by categorizing each repo based on:
- Type of content (code, data, documentation, configuration)
- Sensitivity of exposed algorithms or secrets
- Potential impact if a vulnerability is discovered
Use a risk matrix to assign low, medium, or high priority. Only repos with high-risk code (e.g., authentication modules, encryption functions) warrant additional scrutiny. This step prevents a blanket shutdown of all repos.
Step 2: Implement a Responsible Vulnerability Disclosure Policy
Rather than hiding code, establish a clear process for external researchers to report flaws. A responsible disclosure policy should include:
- Dedicated contact email or bug bounty platform
- Expected response times (e.g., 72 hours for initial acknowledgment)
- Safe harbor clauses protecting researchers acting in good faith
- Path for coordinated public disclosure after a fix is released
This approach leverages community vigilance and aligns with best practices used by major open source projects.
Step 3: Leverage Automated Security Scanning Tools Proactively
Instead of waiting for AI tools to find vulnerabilities externally, run them yourself. Integrate scanners into your CI/CD pipeline to catch issues before code is published. Key tools include:
- Static analysis (e.g., SonarQube, Checkmarx)
- Dependency scanning (e.g., Dependabot, Renovate)
- AI-powered scanners (e.g., Anthropic's Mythos if applicable)
Regular scanning reduces the likelihood of undetected flaws and demonstrates proactive security posture.
Step 4: Engage with the Open Source Community Transparently
Transparency builds trust. Follow the example of NHSX, which open-sourced the COVID Contact Tracing app during the pandemic—even under intense scrutiny from hostile actors. This resulted in zero security incidents. Steps include:
- Publish code as soon as it's stable, not after perfection
- Maintain clear changelogs and documentation
- Encourage community contributions and code reviews
- Set up security mailing lists or slack channels for discussions
Engagement fosters a collaborative environment where vulnerabilities are identified and resolved quickly.
Step 5: Align with National Policies and Standards
Before making policy changes, check existing regulatory frameworks. The UK's Tech Code of Practice, for instance, mandates point 3: "Be open and use open source." Shutting down repos would directly contradict this. Map your open source strategy to relevant national and international standards:
- UK Gov Tech Code of Practice
- EU's Open Source Policy
- NIST cybersecurity frameworks
- ISO 27001 for information security management
Alignment ensures legal compliance and avoids policy conflicts.
Tips for Success
- Start small: Pilot your risk assessment on a few repos before scaling.
- Communicate clearly: Inform your team and community about why repos remain open, and how security is handled.
- Monitor AI advancements: Keep an eye on tools like Mythos but don't react with fear—use them to strengthen your defenses.
- Learn from case studies: The NHS COVID app proved that open source can be secure even under high threat.
- Document everything: Maintain records of risk assessments, vulnerability reports, and policy updates for audits and continuous improvement.