Skip to content

fix: close code-scanning alerts - #39

Merged
agjs merged 1 commit into
mainfrom
fix/code-scanning-alerts
Aug 22, 2026
Merged

fix: close code-scanning alerts#39
agjs merged 1 commit into
mainfrom
fix/code-scanning-alerts

Conversation

@agjs

@agjs agjs commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the 10 open alerts on code scanning.

Alert Check Fix
#1 CodeQL js/file-system-race writeFileSafe uses flag: 'wx' instead of existsSync then write
#46–#48 Scorecard Token-Permissions security-events: write is job-scoped on osv/semgrep/gitleaks (same pattern as CodeQL)
#45 Scorecard Token-Permissions on release-please Already job-scoped contents: write; required for tags/PRs. Scorecard may still warn; that is the least privilege that still releases
#2 Branch-Protection CODEOWNERS + desired-repo-settings: required checks, code-owner review, last-push approval, enforce admins. Apply with scripts/audit-repo-settings.sh after this merges
#27 Code-Review Same protection (required review, no admin bypass in desired state)
#42 / #43 SAST / CI-Tests Required status checks include CodeQL + Semgrep + bun run check. Historical gaps age out once merges cannot skip CI
#28 CII-Best-Practices Not closable from git — needs an OpenSSF Best Practices badge. Scorecard badge is already in the README

Test plan

  • bun run check (57 tests, including writeFileSafe wx / skip / overwrite)
  • CI on this PR
  • After merge: run scripts/audit-repo-settings.sh and apply the printed gh api PUT so Scorecard sees protection on main

Move security-events write to the SARIF-upload jobs, replace existsSync
plus writeFileSync with exclusive wx creates, add CODEOWNERS, and tighten
desired branch-protection (reviews, code owners, required checks, enforce
admins) so Scorecard Branch-Protection / Token-Permissions / Code-Review
can pass.
@agjs
agjs merged commit 076d3b2 into main Aug 22, 2026
11 checks passed
@agjs
agjs deleted the fix/code-scanning-alerts branch August 22, 2026 20:32
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.

1 participant