Claude/fix all issues sy30 e#578
Merged
Merged
Conversation
- storage: wrap user-controlled limit values with min() before slice
allocation to satisfy CWE-789 (excessive memory allocation)
Affected: workspace_repo, scans_repo, projects_repo,
finding_events_repo, audit_log_repo (×3 sites)
- api/auth: replace per-request Secure cookie detection with config-level
authCookieSecure variable; remove shouldUseSecureCookie() which could
return false on localhost even when authCookieSecure=true, causing
CWE-614 (missing Secure attribute). Local dev: set COOKIE_SECURE=false
- frontend/KindBadge: remove always-true !iconOnly guard inside the else
branch (useless conditional, CodeQL warning)
- scripts/frontend-licenses-to-md.cjs: add backslash and backtick
escaping to escapeMd() to fix incomplete string encoding (CWE-116)
https://claude.ai/code/session_01PSP8wFi4XPo9ZAx7qh6kAY
gosec G124 flags http.Cookie when Secure is a variable rather than literal true. The Secure value is intentionally config-driven (COOKIE_SECURE env var) so the flag is expected in dev environments. https://claude.ai/code/session_01PSP8wFi4XPo9ZAx7qh6kAY
CodeQL go/uncontrolled-allocation-size traces taint from user input through min() and if-clamp patterns — neither breaks the taint flow. The only reliable fix is to remove user input from the capacity arg. Capacity is purely a performance hint; Go reallocates automatically, so using a constant (16/32) instead of limit has no semantic effect. https://claude.ai/code/session_01PSP8wFi4XPo9ZAx7qh6kAY
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.
No description provided.