Repository navigation
feat(digest): show Semgrep coverage for repos without Code Security - #218
Merged
Merged
Conversation
added 2 commits
October 21, 2026 15:57
Code Security is not bought, by decision (2026-10-21). Semgrep CE, through the reusable semgrep-scan.yml workflow in github-workflows, is the substitute. The CodeQL section now says so instead of calling the purchase an open cost decision. standards.sh: for a private repo whose default-setup read returns the paid-product 403, read .github/workflows/semgrep-scan.yml with the contents API and record codeql.substitute: - semgrep: the file decodes and has a job- or step-level uses: line for smartwatermelon/github-workflows/.github/workflows/semgrep-scan.yml@. A commented-out reference does not count. - none: HTTP 404 with a 404 body, or the file exists but does not call the reusable workflow (substituteDetail says which). - unreadable: any other failure, with the reason. Never none. render.sh: split the no-Code-Security list into "Covered by Semgrep (CodeQL substitute)", "No code scanning: paid Code Security not bought, no Semgrep caller" and "Semgrep coverage unreadable". A record with no substitute field (an older survey) or an unknown value is unreadable, never covered. The summary line counts each bucket, and "No gaps" still requires no repo without Code Security. Tests: the gh stub gains a .404.json convention; fixtures cover all three states plus a commented-out caller and an undecodable file; a render fixture adds the older-survey and unknown-value records. Every new assertion fails against the previous scripts. Advances #166
The purchase decision is made (not bought, 2026-10-21), so the STATUS lines that called it open now contradict the new entry. Also rejoin a CodeQL comment in render.sh with the jq call it describes. Advances #166
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.
What changes
Code Security is not bought, by decision (Andrew, 2026-10-21). Semgrep CE, through the reusable
semgrep-scan.ymlworkflow insmartwatermelon/github-workflows, is the substitute. The digest's CodeQL section now shows which private repos without Code Security have a Semgrep caller.standards.shFor a repo in the
no-code-securitystate, the survey reads.github/workflows/semgrep-scan.ymlthrough the contents API and recordscodeql.substitute:semgrep: the file decodes, and a job-level or step-leveluses:line points atsmartwatermelon/github-workflows/.github/workflows/semgrep-scan.yml@. A commented-out reference does not count.none: an HTTP 404 with a 404 body. Alsonone: the file exists but does not call the reusable workflow. In that casesubstituteDetailsays so. The brief named three states and did not cover this case. I put it in the "no Semgrep caller" list and kept it visible, never in the covered list.unreadable: any other failure (403, 5xx, a non-file response, an encoding other than base64, a decode failure), with its reason. A failed read is nevernone.render.shThe no-Code-Security list splits into three sub-lists under "Without paid Code Security":
A record without a
substitutefield (from an older survey) or with an unknown value goes to the unreadable list, never to the covered list. The summary line counts each bucket. The "open cost decision" sentence is replaced. "No gaps" still requires zero repos without Code Security, so Semgrep coverage alone never prints "No gaps".Tests
ghstub intest-standards.shgains a.404.jsonconvention that matches real gh output (captured 2026-10-21), plusunset -f ghas in dev-env#215.semgrep,none(404),none(commented-out caller),unreadable(403), andunreadable(encodingnone).fixtures/codeql-semgrep.ndjsonadds render cases for all three states, a record with no substitute field, and a record with an unknown value.origin/mainscripts. Three mutations are each caught: a failed read treated asnone, a plain substring match instead of auses:line, and a missing field rendered as covered.docs/STATUS.mdrecords the decision and the Semgrep pilot onnightowlstudiollc/reliquarist. Its check fails on new findings but is not required. Code Security also leaves the "Open decisions" line.Advances #166