chore: update security-audit.yml#843
Open
hf-security-analysis[bot] wants to merge 1 commit into
Open
Conversation
…security-audit.yml
sayakpaul
reviewed
May 12, 2026
Comment on lines
-169
to
+189
| if grep -q "NO_FINDINGS" /tmp/audit_result.txt; then | ||
| # Validate LLM output format before trusting it | ||
| if grep -qE '^NO_FINDINGS$' /tmp/audit_result.txt && [ $(wc -l < /tmp/audit_result.txt) -eq 1 ]; then | ||
| echo "has_findings=false" >> "$GITHUB_OUTPUT" | ||
| echo "Security audit complete — no findings." | ||
| else | ||
| elif grep -qE '^\*\[' /tmp/audit_result.txt; then | ||
| # Output appears to contain findings in expected mrkdwn format | ||
| echo "has_findings=true" >> "$GITHUB_OUTPUT" | ||
| echo "Security audit complete — findings detected, notifying Slack." | ||
| else | ||
| # Output format is unexpected - possible prompt injection | ||
| echo "has_findings=true" >> "$GITHUB_OUTPUT" | ||
| echo "::error::LLM output format validation failed - possible prompt injection detected" | ||
| printf '*[ALERT]* LLM Security Audit Output Validation Failed\nThe AI analysis returned unexpected output format, which may indicate a prompt injection attack.\nRaw output length: %s bytes\n' "$(wc -c < /tmp/audit_result.txt)" > /tmp/audit_result.txt |
Member
There was a problem hiding this comment.
This section seems unnecessary 👀
Results in https://github.com/huggingface/kernels-community/actions/runs/25699203080/job/75455115464?pr=843.
sayakpaul
reviewed
May 12, 2026
Member
sayakpaul
left a comment
There was a problem hiding this comment.
I think the version tagging and extraction of COMMIT_TITLE seem okay but the output validation bit seems incorrect/unnecessary.
sayakpaul
added a commit
that referenced
this pull request
May 12, 2026
Merged
sayakpaul
added a commit
that referenced
this pull request
May 12, 2026
* pin version of the claude npm installtion. * get security enhancement prompt from #843
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.
Update
.github/workflows/security-audit.ymlworkflow configuration.cc @sayakpaul
Closes huggingface/tracking-issues#459