Repository navigation
Handle GitHub comment runs without Socket ignore commands - #464
Conversation
An issue_comment run on a pull request that already has a Socket security comment crashed with KeyError: 'ignore' and exited 3 unless the pull request also had an honored @SocketSecurity ignore command. check_for_socket_comments only adds the "ignore" key when such a command exists, but remove_comment_alerts called process_security_comment whenever the security comment existed, and get_ignore_options indexed comments["ignore"] directly. Any ordinary comment, or an ignore command from someone without write access, failed the job. remove_comment_alerts (GitHub and GitLab) now returns early and leaves the security comment untouched when there are no ignore commands, and get_ignore_options treats a missing key as no commands. Ignore, ignore-all and --disable-ignore behave as before.
…error # Conflicts: # CHANGELOG.md
…error # Conflicts: # CHANGELOG.md
2.13.2 was released from main, so this change needs the next patch version.
issue_comment runs that have no ignore command|
bugbot run |
PR SummaryLow Risk Overview GitHub and GitLab docs/ci-cd.md notes this no-op behavior and recommends a separate Reviewed by Cursor Bugbot for commit bbe5397. Configure here. |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bbe5397. Configure here.
# Conflicts: # CHANGELOG.md
Summary
GitHub
issue_commentruns could raiseKeyError: 'ignore'when a pull request had a Socket security comment and the fetched thread contained no ignore commands the CLI would honor. The same error occurred when the write-access check rejected the only ignore command.The GitHub and GitLab adapters now leave the security comment alone when there are no ignore commands to process. The shared parser handles a missing ignore list. The CI guide recommends using a dedicated
pull_requestscan job as the required check.Verification
ignore-all, malformed commands, and--disable-ignore. The ordinary and denied cases run with--strict-blockingand check for no scan, comment update, reaction, or ignore telemetry.ignore-allupdated it.Release
Ships in 2.14.0. Merge order: #461 → #462 → #460 → #464 → #465 → #463. Merged together in that order on
mainat #459, the six pass the full test suite andruff check.mainrequires branches to be up to date, so update each PR frommainafter the previous merge.CHANGELOG.mdwill conflict each time: combine the bullets under the existing## 2.14.0subsections (Upgrade notes, Changed, Fixed, Documentation) by hand rather than taking either side.This is 4 of 6. Only
CHANGELOG.mdconflicts.Public Changelog
GitHub pull request comment runs exit
0and leave the Socket security comment unchanged when there are no Socket ignore commands to process.Fixes: CE-517