Skip to content

chore(ci): add two-stage secret gate - #600

Open
erinavllazagaj-eng wants to merge 1 commit into
mainfrom
chore/secret-gate
Open

erinavllazagaj-eng wants to merge 1 commit into
mainfrom
chore/secret-gate

Conversation

@erinavllazagaj-eng

Copy link
Copy Markdown

Adds the secret gate. Nothing blocks yet — the required-check ruleset is created separately by deploy-secret-gate.sh arm runpod/runpod-python after this merges.

Owners: @runpod/security

Before merging, an admin must set the KIMI_RUNPOD_API_KEY repo secret. Without it stage 2 fails closed on every PR.

Stage 1 scans with betterleaks (advisory). Stage 2 triages with Kimi K3 and
publishes the blocking 'AI secret verdict' commit status.

Run 'deploy-secret-gate.sh arm runpod/runpod-python' after this merges.
# No tick when a banner above already failed the gate: a green line under
# a red banner is the one mixed signal this comment must never send.
clean = not (review["injection"] or review["unanswered"] or blocked)
L += ["✅ No secrets in the changed files." if clean
Comment thread .github/security/ghapi.py
HTTP_TIMEOUT_S = 60

def log(msg: str) -> None:
print(msg, flush=True)
Comment on lines +927 to +928
"⚠️ **PR Security Scan did not finish cleanly** — the scanner errored "
"or a suppression was added. Resolve that before reading this.",
Comment on lines +946 to +947
"🚨 **The scanned source attempts to instruct the reviewer.** The "
"verdict below is unreliable; read the change by hand.",
Comment on lines +968 to +970
L += ["", "Rotate before anything else — the value is already in git "
"history and on GitHub's servers, so deleting the line does not "
"un-leak it.", ""]
# on a runner that keeps running, so remove it rather than trusting that.
try:
os.remove(report_path)
except OSError:
Comment on lines +927 to +928
"⚠️ **PR Security Scan did not finish cleanly** — the scanner errored "
"or a suppression was added. Resolve that before reading this.",
Comment on lines +946 to +947
"🚨 **The scanned source attempts to instruct the reviewer.** The "
"verdict below is unreliable; read the change by hand.",
Comment on lines +968 to +970
L += ["", "Rotate before anything else — the value is already in git "
"history and on GitHub's servers, so deleting the line does not "
"un-leak it.", ""]
# on a runner that keeps running, so remove it rather than trusting that.
try:
os.remove(report_path)
except OSError:

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants