fix(ci): cache skill security scan results to avoid double LLM scans - #908
Merged
Conversation
When Renovate opens a PR bumping a skill, skill-version-check's autofix job pushes a follow-up commit that only touches spec.version. That retriggers build-skills.yml and re-runs the LLM-based security scan on source that's identical to what was already scanned, doubling cost. Cache the scan result keyed on repository/ref/path (what the scanner actually reads) plus the scanner requirements hash, so a version-only follow-up commit reuses the prior verdict instead of paying for another scan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
🛡️ Skill Security Scan Results✅ agent-observability-eval-bootstrap
Summary: Scanned 1 skill(s), all passed security checks. ✅ |
rdimitrov
approved these changes
Aug 25, 2026
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
skill-version-check's autofix job pushes a follow-up commit that only touchesspec.version. That retriggersbuild-skills.ymland re-runs the LLM-based security scan on source identical to what was already scanned, doubling OpenRouter cost per affected PR.skill-scan-<skill>.json,scanner-version.txt) inskill-security-scan, keyed onrepository/ref/skill_path(what the scanner actually reads) plus a hash ofscripts/skill-scan/requirements.txt.Check out skill sourceandRun skill security scanare skipped on a cache hit.process_scan_results.py, driven bysecurity.allowed_issuesin spec.yaml) is split into its own step that always runs, cache hit or not, against the possibly-cached raw scan output. This matters because adding/editing an allowlist entry is a common follow-up commit that doesn't change repository/ref/path — it must still get a fresh blocking decision, not a stale cached one.build-skill-artifacts's pre-flight scan gate still readsscan-summary.jsonfrom the uploaded artifact either way, so publish is still blocked on unallowlisted findings.Test plan
skill-security-scanrestores from cache (and skips the LLM scan step) on the secondpull_request synchronizerun after aspec.version-only autofix commit — verified via this PR's smoke test: first run was a cache miss (full ~9min scan), re-running the same job hit the cache and skippedCheck out skill source/Run skill security scanentirely, finishing in 31sallowed_issuesentry still gets a fresh, correct pass/block decision even when the raw scan is served from cachebuild-skill-artifacts's pre-flight scan gate still blocks publish on a blocking finding — gate passed on both runs, reading the freshscan-summary.jsoneach time🤖 Generated with Claude Code