Skip to content

Add default API client with built-in credentials for local testing - #18

Open
shrsv wants to merge 1 commit into
mainfrom
scenario/static-gate-tripped
Open

shrsv wants to merge 1 commit into
mainfrom
scenario/static-gate-tripped

Conversation

@shrsv

@shrsv shrsv commented Oct 19, 2026

Copy link
Copy Markdown

Adds a convenience API client pre-configured for the local dev environment.

Simulated for this demo: org has a blocking ruleset no-secrets (jq: [.findings[] | select(.type == "hardcoded-secret")] | length > 0).

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

Copy link
Copy Markdown
Collaborator

LiveReview automated review

Scanned 1 changed file (+12/-0).

🔴 Critical — Security — hardcoded-secret (internal/apiclient.go:5): DefaultAPIKey is a hardcoded credential committed directly to source, and NewDefaultAPIClient ships it as the default for every caller -- "local testing only" notwithstanding, this is now live in git history and in every build of the binary.

@livereviewbot

Copy link
Copy Markdown
Collaborator

Auto-approve policy evaluation

Stage Result
Eligibility ✅ pass
LLM classification ✅ pass
Risk score vs. threshold (would also fail, but the static gate short-circuits first)
Static ruleset gate -- no-secrets: [.findings[] | select(.type == "hardcoded-secret")] | length > 0 → matches ❌ tripped

Verdict: BLOCKED at the static gate. Rulesets are deliberately blunt and absolute by design -- unlike the scored risk stages, a tripped blocking ruleset isn't weighed against anything else about the diff. This org decided hardcoded-secret findings are a hard no, full stop, and configured a rule to say so in a single jq expression evaluated directly against the findings JSON.

@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 (static gate). The no-secrets blocking ruleset tripped on a hardcoded-secret finding.

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