Repository navigation
fix(scan): grade reports from alert actions - #1706
Open
John-David Dalton (jdalton) wants to merge 1 commit into
Open
John-David Dalton (jdalton) wants to merge 1 commit into
John-David Dalton (jdalton) wants to merge 1 commit into
Conversation
John-David Dalton (jdalton)
requested a review
from Atakan Solak (mapleleafu)
November 9, 2026 17:22
4 tasks
John-David Dalton (jdalton)
requested a review
from Vasco Santos (vasco-santos)
November 9, 2026 17:57
This branch has not been deployed
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.
Port the scan report policy-grading fix from PR #1494 to
v1.x. Grade each alert from its resolvedactionin the full-scan response, removing the stale policy fetch and the extra permission/quota requirement.Source change: SocketDev/socket-cli#1494.
Note
Medium Risk
Changes how CI/policy pass-fail is computed for scan reports, so behavior may differ if API-resolved actions diverge from the old client-side policy lookup.
Overview
scan reportnow judges policy health from each alert’s resolvedactionon the full-scan API response instead of fetching org security policy and mapping alert types to rules locally.That removes the extra
getOrgSecurityPolicycall, simplifiesfetchScanDatato a single full-scan request, and drops thesecurity-policy:readpermission and second API quota unit for this command (updated inrequirements.jsonand help text).generateReportno longer takes a policy object; alerts without a resolved action are ignored.New
fetch-report-datatests and updated report tests cover the new data path and grading behavior.Reviewed by Cursor Bugbot for commit 3ca1ccc. Configure here.