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
2 changes: 1 addition & 1 deletion scripts/security-audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ else
fi

# Check for dangerous path patterns
if grep -rq "\\.\\./\|\\.\\.\\\\\" "$IMPL_DIR/src" | grep -v "test\|comment"; then
if grep -rqE '\.\./|\.\.\\' "$IMPL_DIR/src"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

Suggestion: The fix correctly addresses the shell escaping issue but removes the noise-filtering logic for tests and comments. This will lead to high noise in audit results. Re-implement the filter using a pipeline that correctly excludes these patterns and checks the exit status.

Suggested change
if grep -rqE '\.\./|\.\.\\' "$IMPL_DIR/src"; then
if grep -rE '\.\./|\.\.\\' "$IMPL_DIR/src" | grep -vE 'test|comment' | grep -q .; then

check "Hardcoded traversal patterns" "WARN" "Found ../ patterns - verify they're safe"
else
check "Hardcoded traversal patterns" "PASS"
Expand Down
Loading