Skip to content

Add raw query helper and request logging for debugging - #20

Open
shrsv wants to merge 1 commit into
mainfrom
scenario/compounding-two-critical-security
Open

shrsv wants to merge 1 commit into
mainfrom
scenario/compounding-two-critical-security

Conversation

@shrsv

@shrsv shrsv commented Oct 19, 2026

Copy link
Copy Markdown

Adds a couple of small debugging helpers used while chasing down a prod issue last week -- useful enough to keep around.

LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
@livereviewbot

Copy link
Copy Markdown
Collaborator

LiveReview automated review

Scanned 2 changed files (+12/-0).

🔴 Critical — Security (internal/debugquery.go:7): BuildLookupQuery builds a query string via raw fmt.Sprintf interpolation of key with no escaping or parameterization -- classic SQL-injection shape, even though this demo service has no real database yet. Any caller passing user-influenced input through key is exploitable the moment this is wired to a real backend.

🔴 Critical — Security (internal/debuglog.go:8): LogRequest prints the full, unredacted auth header to logs on every call. Bearer tokens, session cookies, or API keys in that header are now sitting in plaintext log output -- a second, independent critical security issue in the same diff.

@livereviewbot

Copy link
Copy Markdown
Collaborator

Auto-approve policy evaluation

Stage Result
Eligibility ✅ pass
LLM classification (security-sensitive-but-confident, confidence 9) ✅ pass
Findings 2x critical / security
Risk score vs. threshold ❌ fails, decisively

Verdict: BLOCKED at the risk stage. This is the compounding check: a second independent critical/security finding must never make the risk score look safer than the single-finding case (critical-finding-in-security-blocks) -- it blocks at least as hard. More risk signal should never be rewarded.

@livereviewbot livereviewbot added auto-approve-demo Scenario in the Auto-Approve Gallery demo held-for-review LiveReview held this PR for human review labels Oct 19, 2026

@livereviewbot livereviewbot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Auto-approve policy verdict: BLOCKED (risk stage). Two independent critical/security findings compound -- blocks at least as decisively as a single one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-approve-demo Scenario in the Auto-Approve Gallery demo held-for-review LiveReview held this PR for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants