Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions scripts/check-safe-outputs-conformance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@ check_max_limits() {
# Skip test and utility files
[[ "$handler" =~ (test|parse|buffer|factory) ]] && continue

# Check if handler enforces max limits
if ! grep -q "\.length.*>.*\.max\|enforceMaxLimit\|checkLimit\|max.*exceeded" "$handler"; then
# Only check files that perform GitHub API operations
if ! grep -q "octokit\." "$handler"; then
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern octokit. does not match the actual GitHub API usage pattern in this codebase. Handler files use github.rest. and github.graphql (where github is a global variable from @actions/github-script), not octokit.. This means the scope filter will match zero files, causing SEC-003 to report a false pass even though it's not checking any handlers. The same issue exists in SEC-002 (line 90). The pattern should be changed to match actual API calls, such as github\.rest\.|github\.graphql or simply \.rest\.|\.graphql.

This issue also appears on line 120 of the same file.

Copilot uses AI. Check for mistakes.
continue
fi

# Check if handler enforces max limits using any recognized pattern
if ! grep -qE "\.length.*>.*\.max|enforceMaxLimit|checkLimit|max.*exceeded|enforceArrayLimit|tryEnforceArrayLimit|limit_enforcement_helpers" "$handler"; then
log_medium "SEC-003: $handler may not enforce max limits"
failed=1
fi
Expand Down