Skip to content

Apply the template's own security advice to this repository - #35

Merged
leynier merged 1 commit into
mainfrom
harden-template-repo
Aug 8, 2026
Merged

Apply the template's own security advice to this repository#35
leynier merged 1 commit into
mainfrom
harden-template-repo

Conversation

@leynier

@leynier leynier commented Aug 8, 2026

Copy link
Copy Markdown
Owner

OpenSSF Scorecard raised six findings against this repository. Two were real, and both were the same mistake: the template hands generated projects a security policy and a CodeQL workflow, while the repository that ships them had neither.

Fixed

Finding Severity Fix
Security-Policy medium SECURITY.md added, scoped to the template — a bad default here propagates into every generated project
SAST medium CodeQL now runs against this repository, matching what generated projects get

Not fixed, on purpose

Finding Why
Code-Review (high) Cannot be satisfied by a sole maintainer approving their own pull requests
Fuzzing Does not apply to a project template with no parsing surface
CII-Best-Practices Requires registering with an external programme
CI-Tests Should resolve itself as more commits arrive through pull requests

Also

  • Bumps the uv_build floor in the generated pyproject.toml to match the bump Dependabot made to this repository's own, so the two do not drift.
  • Adds a test asserting this repository keeps the files and workflows it generates — including that some job still produces the CI status check that branch protection requires, since losing that name blocks every future merge.

OpenSSF Scorecard raised six findings against this repository. Two were
real, and both were the same mistake: the template hands generated
projects a security policy and a CodeQL workflow, while the repository
that ships them had neither.

- SECURITY.md now exists here, scoped to the template: a bad default or
  an over-permissioned workflow here propagates into every project
  generated from it.
- CodeQL runs against this repository, matching what generated projects
  get.

Also bump the uv_build floor in the generated pyproject to match the
bump Dependabot made to this repository's own.

The remaining Scorecard findings are not addressed on purpose:
Code-Review cannot be satisfied by a sole maintainer approving their own
pull requests, Fuzzing does not apply to a project template with no
parsing surface, and CII-Best-Practices requires registering with an
external programme.

A new test asserts this repository keeps the files and workflows it
generates, including that some job still produces the "CI" status check
that branch protection requires.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@leynier
leynier merged commit 9ef23dc into main Aug 8, 2026
10 checks passed
@leynier
leynier deleted the harden-template-repo branch August 8, 2026 21:29
@leynier leynier mentioned this pull request Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants