Add CodeQL SAST, a cargo-fuzz harness, and scorecard docs - #16
Merged
Conversation
Run CodeQL static analysis over every commit and add an isolated cargo-fuzz harness fuzzing the request-path decision surface and policy parsing. A scheduled deep-fuzz job and a light PR regression smoke job exercise the fuzzers; the crate is a standalone workspace so the production dependency tree and binary budget are untouched. Document the scorecard posture in README and STATUS.
Remove the Known Gaps section's three stale entries (audit, limits, and path normalization are all implemented) and point it at STATUS.md as the current-state home. Add a contributing guide that documents the workflow, required checks, and coding standards, satisfying the OpenSSF Best Practices contribution_requirements criterion.
|
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:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Raises the project's OpenSSF Scorecard score (currently 6.2) by addressing the two checks that are fixable in code, and documents the rest. No production
src/changes.Why
Scorecard flags two 0-score checks that a code change can actually resolve:
The remaining low checks (Code-Review, Branch-Protection, Maintained, Contributors, Signed-Releases, CII-Best-Practices) need repo settings, time, or process — not code — so they're documented rather than claimed.
What changed
.github/workflows/codeql.yml— CodeQL analysis (languages: rust) on push, PR, and a weekly schedule. SHA-pinned, least-privilege permissions.fuzz/— an isolated cargo-fuzz / libfuzzer-sys crate with two targets:path_normalizer— fuzzes the request-path decision surface (percent-decoding, dot-segments, API-version strip, pattern matching).policy_parse— fuzzes TOML policy parsing and rule application.[workspace]andCargo.lock, so the production dependency tree (<130 crates) and binary budget (<8 MB) are untouched..github/workflows/fuzz.yml— a scheduled deep-fuzz job (-max_total_time=300) plus a light PR regression smoke job (-max_total_time=20), both using the debug profile.README.md/STATUS.md— a## Scorecardsection documenting what's addressed and what the remaining checks require.SECURITY.md— removed three stale "Known Gaps" that are already implemented; points atSTATUS.md.CONTRIBUTING.md— added (workflow, required checks, coding standards).Scorecard impact
Expected aggregate: ~6.2 → ~7.3–7.6 (both checks are high-weight). The score only refreshes after this merges to
mainand the scorecard action re-runs.Verification
cargo build --lockedandcargo test --all-targets --lockedgreen; rootCargo.lockunchanged.cargo +nightly check --manifest-path fuzz/Cargo.toml) and smoke-run with no crashes (-runs=2000).Caveats
rustccodegen ICE insidetokiounder-C passes=sancov-moduleon current nightly, so both fuzz jobs use the debug profile (-D), which builds and runs cleanly. Worth revisiting when nightly stabilizes.