Skip to content

A comprehensive Claude Code/Copilot skill that helps developers build secure applications following [OpenSSF (Open Source Security Foundation)](https://openssf.org/) best practices.

License

Notifications You must be signed in to change notification settings

ryanwaite/openssf-skill

Repository files navigation

OpenSSF Security Instructions for AI Coding Assistants

A comprehensive set of security instructions and resources that help developers build secure applications following OpenSSF (Open Source Security Foundation) best practices.

Supports both Claude Code and GitHub Copilot.

Features

  • Threat Modeling: STRIDE methodology guide with templates
  • Security Policies: SECURITY.md and vulnerability disclosure templates
  • OpenSSF Scorecard: All 19 checks explained with remediation steps
  • OSPS Baseline: Level 1 compliance checklist
  • SBOM Generation: Tools for 12+ languages/ecosystems
  • SLSA Provenance: GitHub Actions workflows for Level 3
  • Dependency Security: Scanning tools and vulnerability response
  • Security Code Review: OWASP Top 10 focused review guide
  • Secrets Scanning: Gitleaks, TruffleHog, detect-secrets, and pre-commit hooks
  • Artifact Signing: Sigstore/Cosign keyless signing with Fulcio and Rekor
  • Container Security: Dockerfile hardening, Trivy/Grype scanning, distroless images
  • OpenSSF Best Practices Badge: Self-certification guide for Passing/Silver/Gold levels
  • GitLab CI Support: Security workflow templates for GitLab CI/CD pipelines
  • Multi-Language Copilot Instructions: Secure coding patterns for 8+ languages

Installation

For GitHub Copilot

Copy the Copilot instructions file to your repository:

# Create .github directory if it doesn't exist
mkdir -p .github

# Download the instructions file
curl -o .github/copilot-instructions.md \
  https://raw.githubusercontent.com/ryanwaite/openssf-skill/main/.github/copilot-instructions.md

Then enable custom instructions in VS Code:

  1. Open Settings (Cmd+, or Ctrl+,)
  2. Search for "Copilot instruction"
  3. Enable github.copilot.chat.codeGeneration.useInstructionFiles

Copilot will now apply OpenSSF security best practices to all code suggestions in that repository.

For Claude Code

Option 1: Clone to Global Skills (Recommended)

# Clone directly to your global skills directory
git clone https://github.com/ryanwaite/openssf-skill.git ~/.claude/skills/openssf

Option 2: Project-Specific Installation

# Clone into your project's .claude/skills directory
mkdir -p .claude/skills
git clone https://github.com/ryanwaite/openssf-skill.git .claude/skills/openssf

Then invoke the skill in any project with /openssf.


Usage

The most simple way to get started is:

  1. Start GitHub Copilot or Claude Code
  2. cd to the root of an open source project
  3. Run /openssf what can you do for me?

Additional options are below.

Additional options

Invoke the skill with /openssf, then:

  • "Help me create a threat model for my authentication system"
  • "Generate a SECURITY.md for this project"
  • "What OpenSSF Scorecard checks am I failing?"
  • "Set up SBOM generation for my releases"
  • "Review this code for security issues"

The skill will:

  1. Assess your project's current security posture
  2. Detect languages and existing security artifacts
  3. Recommend prioritized security improvements
  4. Guide you through creating security artifacts

Example Walkthrough

This walkthrough demonstrates using the OpenSSF skill with GitHub Copilot to assess and improve the security posture of an open source repository.

Step 1: Invoke the Skill

Start by invoking the OpenSSF skill in your project:

Invoke OpenSSF Skill

What It Can Do

The skill looks at the project and provides an assessment of the overall project:

Ask Capabilities

Comprehensive List of Available Capabilities

The skill provides a comprehensive list of security features it can help with:

Capabilities List Scorecard Suggestion

Recommendation for Next Steps

The skill provides a prioritized list of what to do next along with the approximate time to complete each activity:

Run Scorecard

Step 2: Run Scorecard

In this walkthrough we go with the recommendation to start with running Scorecard:

Scorecard Results

Scorecard Results

The skill spins up a container, runs the Scorecard analysis, and provides the results:

Implement Improvements

From here, you can use the skill to keep implementing changes.


Repository Structure

openssf-skill/
├── .github/
│   └── copilot-instructions.md  # GitHub Copilot instructions
├── SKILL.md                      # Claude Code skill file
├── CONTRIBUTING.md               # Contribution guidelines
├── scripts/
│   └── assess-project.py         # Project security assessment
├── tests/
│   └── test_assess_project.py    # Unit tests (50 tests)
├── templates/
│   ├── SECURITY.md.template
│   ├── threat-model.md.template
│   └── vulnerability-disclosure-policy.md.template
├── workflows/
│   ├── scorecard.yml.template
│   ├── slsa-provenance.yml.template
│   ├── sbom-generation.yml.template
│   ├── dependency-review.yml.template
│   └── gitlab-ci-security.yml.template  # GitLab CI/CD
└── references/
    ├── threat-modeling/          # STRIDE methodology
    ├── scorecard/                # All 19 checks + remediation
    ├── osps-baseline/            # Compliance checklists
    ├── sbom/                     # Language-specific tools
    ├── slsa/                     # Supply chain security
    ├── dependency-security/      # Vulnerability scanning
    ├── security-policies/        # Policy creation guides
    ├── security-requirements/    # Requirements checklist
    ├── code-review/              # Security review guide
    ├── secrets-scanning/         # Secret leak prevention
    ├── signing/                  # Sigstore/Cosign guide
    ├── container-security/       # Docker hardening
    └── best-practices-badge/     # OpenSSF Badge guide

Security Topics Covered

Topic Description
Threat Modeling STRIDE methodology, DFD creation, risk assessment
Security Policies SECURITY.md, vulnerability disclosure, response timelines
OpenSSF Scorecard 19 automated security checks with remediation
OSPS Baseline Level 1 compliance checklist
SBOM CycloneDX/SPDX generation for all major languages
SLSA Supply chain security levels 0-3
Dependencies Vulnerability scanning, update strategies
Code Review OWASP Top 10, language-specific patterns
Secrets Scanning Gitleaks, TruffleHog, detect-secrets, pre-commit hooks
Artifact Signing Sigstore ecosystem: Cosign, Fulcio, Rekor, Gitsign
Container Security Dockerfile hardening, image scanning, distroless bases
Best Practices Badge OpenSSF Badge self-certification (Passing/Silver/Gold)

Requirements

Tool Required For
GitHub Copilot Copilot instructions
Claude Code Claude Code skill
Git Cloning the repository

Contributing

Contributions are welcome! See CONTRIBUTING.md for detailed guidelines, content standards, and testing instructions.

Quick start:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes (run python3 -m unittest discover tests/ -v to validate)
  4. Submit a pull request

License

MIT License - see LICENSE for details.


References


Acknowledgments

Built following OpenSSF guidelines and recommendations for secure software development.

About

A comprehensive Claude Code/Copilot skill that helps developers build secure applications following [OpenSSF (Open Source Security Foundation)](https://openssf.org/) best practices.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages