Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
926d5f5
fix: reconcile Cloud setup ownership and agent rules
Oct 17, 2026
86f356c
fix: Load cached base only when unpinned
qodo-code-review[bot] Oct 17, 2026
2d5d978
fix: Check telemetry flags per shell invocation
qodo-code-review[bot] Oct 17, 2026
914791b
fix: 2 findings — Ignore warning-level scan diagnostics; Validate SARIF
qodo-code-review[bot] Oct 17, 2026
a906d58
fix: Preserve malformed settings during uninstall
qodo-code-review[bot] Oct 17, 2026
37f60a2
fix: Regenerate legacy Codex runtime profiles
qodo-code-review[bot] Oct 17, 2026
7d688e4
fix: Run dependent hooks after bootstrap failures
qodo-code-review[bot] Oct 17, 2026
8b1af03
fix: verify Cloud migration and startup review follow-ups
Oct 17, 2026
b68b600
fix(semgrep): accept info-level notices and require SARIF result mess…
BigSimmo Oct 17, 2026
6ea705f
fix(codex-cloud): validate Codex config before replacing the runtime …
BigSimmo Oct 17, 2026
ec8ad8f
docs(codex-cloud): note that markerless legacy profiles bind to the f…
BigSimmo Oct 17, 2026
22617a2
Merge remote-tracking branch 'origin/main' into codex/cloud-cross-rep…
BigSimmo Oct 17, 2026
6fb2665
test(ui): re-scroll when late content moves the prescribing results e…
BigSimmo Oct 17, 2026
36948ad
fix(tests): settle hydration redirects and live scroll endpoints
Oct 17, 2026
6bfe9b9
Merge concurrent PR 3597 endpoint repair
Oct 17, 2026
bb544f9
fix(tests): fail fast on unexpected hydration probe errors
BigSimmo Oct 17, 2026
af8d885
Merge remote-tracking branch 'origin/main' into gb/3597-qodo-1709
BigSimmo Oct 17, 2026
ba7769e
Merge branch 'main' into codex/cloud-cross-repo-hardening
BigSimmo Oct 17, 2026
a7669db
Merge branch 'main' into codex/cloud-cross-repo-hardening
BigSimmo Oct 17, 2026
aae39fd
Merge origin/main into codex/cloud-cross-repo-hardening; fix hydratio…
grokbot Oct 17, 2026
6ecf660
fix(cloud): maintenance reads single-quoted generated shim targets
grokbot Oct 17, 2026
677ee34
fix(cloud): unescape only single-quoted shim targets
grokbot Oct 17, 2026
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
6 changes: 4 additions & 2 deletions .agents/skills/prompt-perfector/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
name: prompt-perfector
description: Refine or evaluate LLM and agent prompts while preserving intent with explicit output and action controls. Use when asked to polish, perfect, rewrite, structure, optimize, or assess a prompt.
description: Refine or evaluate prompts, preserving intent, output controls and authority. Use for prompt refinement or assessment.
---

# Prompt Perfector

Produce a ready-to-use prompt that preserves intent. Refine only unless evaluation or execution is explicit.
Refine only unless evaluation or execution is explicit.

Claude’s separately named `prompt` skill refines then executes within existing authority. These are distinct defaults; explicit user controls win.

## Workflow

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/frontend-ui-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Follow `AGENTS.md` review throttling and `docs/codex-review-protocol.md` before

## Gate

For UI/browser/styling/routing/reduced-motion/forced-colors changes, run `npm run ensure` before browser QA (never assume port 3000/3001/3002), then use `npm run verify:ui` (Chromium) as the gate. These are local/offline-safe (demo mode).
Follow `docs/agents/verification-gates.md#gate-selection`. For UI/browser/styling/routing/reduced-motion/forced-colors changes, run `npm run ensure` before browser QA, use its printed URL and verify `/api/local-project-id`, then prove the changed owner or journey first. Use `npm run verify:ui` for shared UI foundations or when PR/handoff policy requires the complete Chromium gate. Report focused proof as focused proof, retaining required broad gates and any physical Safari or installed-PWA acceptance gaps.

## Review Checklist

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/ingestion-worker-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Follow `AGENTS.md` review throttling and `docs/codex-review-protocol.md` before

## Provider boundary

Ingestion checks against live services and any reindex that spends OpenAI budget are confirmation-required (`AGENTS.md`). Report the command and ask. Note the worker stack (Deno edge functions, Python OCR in `worker/python/requirements.txt`) does not run in this VM — do not attempt to execute it.
Ingestion checks against live services and any reindex that spends OpenAI budget are confirmation-required (`AGENTS.md`). Report the command and ask. Inspect current-host capabilities before selecting offline worker checks: confirm the required Deno/Python binaries and the specific command's local dependencies, fixtures and service needs. Run supported offline checks when available; report missing capabilities and unrun evidence precisely. A provisioned runtime does not authorize live ingestion, reindexing, downloads or provider spend.

## Review Checklist

Expand Down
6 changes: 3 additions & 3 deletions .claude/agents/verification-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Default to running **only** offline-safe gates. For any provider-touching comman

- `lint`, `typecheck`, `test`
- `verify:cheap` (lock parity + diff-integrity + lint + typecheck + unit tests — nothing else)
- `verify:full` (41 static/consistency gates, then lint + typecheck + test; does not invoke cheap)
- `verify:full` (static/consistency gates, then lint + typecheck + test; does not invoke cheap)
- `verify:pr-local` (risk-routed PR mirror: focused docs/workflow contracts for light scope; fail-closed lint/typecheck/full unit plus applicable build/domain checks for executable or unknown scope); inspect selection with `verify:pr-local -- --dry-run --files <paths>`
- `eval:rag:offline`, `ensure`, `verify:ui` (Chromium, local dev server / demo mode)

Expand All @@ -37,9 +37,9 @@ Default to running **only** offline-safe gates. For any provider-touching comman
## Routing by touched surface

- **Retrieval / ranking / selection / chunking / scoring:** offline gate is `verify:cheap`; note that the merge gate `eval:retrieval:quality` (36/36) is provider-touching → report and ask.
- **Ingestion / answer-gen / source-governance / privacy / production env:** smallest relevant domain check + `check:production-readiness` (runs fail-closed offline).
- **Ingestion / answer-gen / source-governance / privacy / production env:** follow `docs/agents/verification-gates.md#gate-selection`: smallest relevant offline domain check; add `check:production-readiness:ci` when readiness or configuration structure is in scope. The bare `check:production-readiness` is release-mode proof for production release or activation, retaining all applicable approvals.
- **UI / frontend / a11y / routing / styling:** `npm run ensure`, then the affected journey;
add `verify:ui` only for shared UI foundations or a distinct unclosed failure class.
follow `docs/agents/verification-gates.md#gate-selection` and add `verify:ui` for shared UI foundations or when PR/handoff policy requires the complete Chromium gate.
- **Supabase env/config change:** `check:supabase-project` (provider — report and ask).
- **Default source/config/test change:** `verify:pr-local` at PR handoff; do not pre-run
`verify:cheap` because the routed handoff gate already owns that coverage.
Expand Down
2 changes: 2 additions & 0 deletions .claude/cloud-profile/skills/prompt/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: Perfect a rough request or draft prompt using relevant context, att

Turn the user's request and relevant supplied context into a precise, ready-to-use prompt, then carry it out. Preserve intent, avoid scope creep, and use only the detail, context, tools, and validation that change the result.

**Default for this skill:** refine, show the perfected prompt, then execute within existing authority. The separately named repository `prompt-perfector` skill refines only unless execution is explicit; it is not an alias. Preserve the invoked skill's default and the user's latest explicit controls.

## Operating principles

- Put the outcome, constraints, and success criteria ahead of process detail.
Expand Down
61 changes: 27 additions & 34 deletions .claude/cloud-profile/skills/semgrep/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
---
name: semgrep
description: >-
Run Semgrep static analysis scan on a codebase using parallel subagents.
Run Semgrep static analysis on a codebase with capability-checked workers.
Supports two scan modes — "run all" (full ruleset coverage) and "important
only" (high-confidence security vulnerabilities). Automatically detects and
uses Semgrep Pro for cross-file taint analysis when available. Use when asked
only" (high-confidence security vulnerabilities). Records local Semgrep Pro
evidence and uses the approved engine. Use when asked
to scan code for vulnerabilities, run a security audit with Semgrep, find
bugs, or perform static analysis. Spawns parallel workers for multi-language
codebases.
allowed-tools: Bash Read Glob Task AskUserQuestion TaskCreate TaskList TaskUpdate
bugs, or perform static analysis. Uses parallel workers when authorized and
supported, with bounded direct execution as a fallback.
---

# Semgrep Security Scan

Run a Semgrep scan with automatic language detection, parallel execution via Task subagents, and merged SARIF output.
Run a Semgrep scan with local language detection, supported execution tools, and merged SARIF output. Inspect current-host capabilities; this seed does not install a scanner agent or prove hosted tool availability.

## Essential Principles

1. **Always use `--metrics=off`** — Semgrep sends telemetry by default; `--config auto` also phones home. Every `semgrep` command must include `--metrics=off` to prevent data leakage during security audits.
2. **User must approve the scan plan (Step 3 is a hard gate)** — The original "scan this codebase" request is NOT approval. Present exact rulesets, target, engine, and mode; wait for explicit "yes"/"proceed" before spawning scanners.
1. **Always use `--metrics=off`** — Semgrep sends telemetry by default; `--config auto` also phones home. Every `semgrep` command must include `--metrics=off`. This disables telemetry, not registry or provider access; those actions still need authorization.
2. **User must approve the scan plan (Step 3 is a hard gate)** — A generic "scan this codebase" request does not approve an unspecified plan. Present exact rulesets, target, engine, mode and network/provider actions before execution. Preserve existing explicit authorization for that exact plan; ask only for missing authority.
3. **Third-party rulesets are required, not optional** — Trail of Bits, 0xdea, and Decurity rules catch vulnerabilities absent from the official registry. Include them whenever the detected language matches.
4. **Spawn all scan Tasks in a single message** — Parallel execution is the core performance advantage. Never spawn Tasks sequentially; always emit all Task tool calls in one response.
5. **Always check for Semgrep Pro before scanning** — Pro enables cross-file taint tracking and catches ~250% more true positives. Skipping the check means silently missing critical inter-file vulnerabilities.
4. **Use supported execution capabilities** — When delegation is authorized and workers are available, dispatch independent language tasks together using the bounded scanner prompt. Otherwise execute the same approved tasks directly within current-host limits. Do not invent an agent type, tool or delegation authority.
5. **Record engine evidence honestly** — Inspect only local binary/version/installation metadata before approval. Pro supports cross-file analysis; installed metadata does not prove a usable license. Any Pro, registry or network validation belongs after Step 3 authorization. Stop on an unavailable approved engine; do not silently substitute OSS.

## When to Use

Expand Down Expand Up @@ -79,15 +78,12 @@ $OUTPUT_DIR/

## Prerequisites

**Required:** Semgrep CLI (`semgrep --version`). If not installed, see [Semgrep installation docs](https://semgrep.dev/docs/getting-started/).
**Required:** Semgrep CLI. Discover it locally with `command -v semgrep` and `SEMGREP_ENABLE_VERSION_CHECK=0 semgrep --metrics=off --version`. If absent, report the missing capability; installation needs applicable authority. See [Semgrep installation docs](https://semgrep.dev/docs/getting-started/).

**Optional:** Semgrep Pro — enables cross-file taint tracking, inter-procedural analysis, and additional languages (Apex, C#, Elixir). Check with:

```bash
semgrep --pro --validate --config p/default 2>/dev/null && echo "Pro available" || echo "OSS only"
```
**Optional:** Semgrep Pro — enables cross-file taint tracking, inter-procedural analysis, and additional languages (Apex, C#, Elixir). Read local installation metadata if available and record Pro as installed, absent or unverified. Do not use a registry ruleset or a Pro/license/network probe as an availability check before approval. Pro usability is established only by authorized execution; a failed probe is not evidence of OSS-only availability.

**Limitations:** OSS mode cannot track data flow across files. Pro mode uses `-j 1` for cross-file analysis (slower per ruleset, but parallel rulesets compensate).
The bundled scan-status helper requires a supported Bash shell and local Python 3 to validate each fresh JSON/SARIF pair. Check these local capabilities before execution; missing tooling does not authorize installation.

## Scan Modes

Expand All @@ -109,10 +105,10 @@ See [scan-modes.md](references/scan-modes.md) for metadata criteria and jq filte
```
┌──────────────────────────────────────────────────────────────────┐
│ MAIN AGENT (this skill) │
│ Step 1: Detect languages + check Pro availability │
│ Step 1: Detect languages + inspect local engine evidence │
│ Step 2: Select scan mode + rulesets (ref: rulesets.md) │
│ Step 3: Present plan + rulesets, get approval [⛔ HARD GATE] │
│ Step 4: Spawn parallel scan Tasks (approved rulesets + mode) │
│ Step 4: Execute approved scans via workers or directly │
│ Step 5: Merge results and report │
└──────────────────────────────────────────────────────────────────┘
│ Step 4
Expand All @@ -134,41 +130,37 @@ See [scan-modes.md](references/scan-modes.md) for metadata criteria and jq filte

| Step | Action | Gate | Key Reference |
|------|--------|------|---------------|
| 1 | Resolve output dir, detect languages + Pro availability | — | Use Glob, not Bash |
| 1 | Resolve output dir, detect languages + local engine evidence | Local only | Supported file search and local metadata |
| 2 | Select scan mode + rulesets | — | [rulesets.md](references/rulesets.md) |
| 3 | Present plan, get explicit approval | ⛔ HARD | AskUserQuestion |
| 4 | Spawn parallel scan Tasks | — | [scanner-task-prompt.md](references/scanner-task-prompt.md) |
| 3 | Present plan, get explicit approval | ⛔ HARD | Supported user-input tool or ordinary chat |
| 4 | Execute approved scans via supported workers or directly | Approved actions only | [scanner-task-prompt.md](references/scanner-task-prompt.md) |
| 5 | Merge results and report | — | Merge script (below) |

**Task enforcement:** On invocation, create 5 tasks with blockedBy dependencies (each step blocks the previous). Step 3 is a HARD GATE — mark complete ONLY after user explicitly approves.
**Task tracking:** Use the host's supported task tracker for the five ordered steps when available, with each step depending on the previous. Otherwise keep a short checklist. Step 3 is a HARD GATE regardless of tracking tools; mark it complete only with explicit authorization for the exact plan.

**Merge command (Step 5):**

```bash
uv run {baseDir}/scripts/merge_sarif.py $OUTPUT_DIR/raw $OUTPUT_DIR/results/results.sarif
```

## Agents

| Agent | Tools | Purpose |
|-------|-------|---------|
| `static-analysis:semgrep-scanner` | Bash | Executes parallel semgrep scans for a language category |
## Execution capability

Use `subagent_type: static-analysis:semgrep-scanner` in Step 4 when spawning Task subagents.
Use an available general-purpose worker with shell/file access and the bounded [scanner task prompt](references/scanner-task-prompt.md) when delegation is authorized. A specialist scanner is optional only when the current host actually exposes it; the repository bundles no exact scanner-agent dependency. If workers are unavailable or delegation is not authorized, use direct execution of the same approved task with bounded concurrency. Report the execution path actually used.

## Rationalizations to Reject

| Shortcut | Why It's Wrong |
|----------|----------------|
| "User asked for scan, that's approval" | Original request ≠ plan approval. Present plan, use AskUserQuestion, await explicit "yes" |
| "User asked for scan, that's approval" | A generic scan request does not specify a plan. Obtain missing exact-plan authority; preserve an existing explicit approval |
| "Step 3 task is blocking, just mark complete" | Lying about task status defeats enforcement. Only mark complete after real approval |
| "I already know what they want" | Assumptions cause scanning wrong directories/rulesets. Present plan for verification |
| "Just use default rulesets" | User must see and approve exact rulesets before scan |
| "Add extra rulesets without asking" | Modifying approved list without consent breaks trust |
| "Third-party rulesets are optional" | Trail of Bits, 0xdea, Decurity catch vulnerabilities not in official registry — REQUIRED |
| "Use --config auto" | Sends metrics; less control over rulesets |
| "One Task at a time" | Defeats parallelism; spawn all Tasks together |
| "Pro is too slow, skip --pro" | Cross-file analysis catches 250% more true positives; worth the time |
| "A missing scanner agent blocks every scan" | Use a supported general worker when authorized, or execute the bounded approved tasks directly |
| "Change the engine without asking" | Pro and OSS have different coverage; preserve the approved engine or obtain a changed plan |
| "Semgrep handles GitHub URLs natively" | URL handling fails on repos with non-standard YAML; always clone first |
| "Cleanup is optional" | Cloned repos pollute the user's workspace and accumulate across runs |
| "Use `.` or relative path as target" | Subagents need absolute paths to avoid ambiguity |
Expand All @@ -190,11 +182,12 @@ Use `subagent_type: static-analysis:semgrep-scanner` in Step 4 when spawning Tas

- [ ] Output directory resolved (user-specified or auto-incremented default)
- [ ] All generated files stored inside `$OUTPUT_DIR`
- [ ] Languages detected with file counts; Pro status checked
- [ ] Languages detected with file counts; local engine evidence and Pro uncertainty recorded
- [ ] Scan mode selected by user (run all / important only)
- [ ] Rulesets include third-party rules for all detected languages
- [ ] User explicitly approved the scan plan (Step 3 gate passed)
- [ ] All scan Tasks spawned in a single message and completed
- [ ] Approved scans completed via supported authorized workers or bounded direct execution
- [ ] Every approved scan's PID/status and fresh JSON/SARIF pair passed `wait_semgrep_scans`; no incomplete batch or successful subset is reported as complete
- [ ] Every `semgrep` command used `--metrics=off`
- [ ] Approved rulesets logged to `$OUTPUT_DIR/rulesets.txt`
- [ ] Raw per-scan outputs stored in `$OUTPUT_DIR/raw/`
Expand Down
10 changes: 5 additions & 5 deletions .claude/cloud-profile/skills/semgrep/references/rulesets.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@ These are **NOT optional**. Include automatically when language matches:
| Java | [Atlassian Labs](https://github.com/atlassian-labs/atlassian-sast-ruleset) | Atlassian-maintained Java rules |
| Python, JS/TS, Java, Ruby, Go, PHP | [Apiiro](https://github.com/apiiro/malicious-code-ruleset) | Malicious code detection, supply chain |

### Step 5: Verify Rulesets
### Step 5: Propose Ruleset Verification

Before finalizing, verify official rulesets load:
Before approval, record proposed ruleset identifiers without contacting registries. Registry validation and browsing are network actions: list the exact lookups in the Step 3 plan and perform them only after authorization. With that authority, verify approved rulesets load and retain the command's actual status:

```bash
# Quick validation (exits 0 if valid)
semgrep --config p/python --validate --metrics=off 2>&1 | head -3
# After Step 3 authorizes this registry lookup (do not pipe away its status):
SEMGREP_ENABLE_VERSION_CHECK=0 semgrep --config p/python --validate --metrics=off
```

Or browse the [Semgrep Registry](https://semgrep.dev/explore).
The [Semgrep Registry](https://semgrep.dev/explore) is an alternative after the same network authorization. For an approved local-only scan, validate only the approved local rule paths and report registry coverage as unverified.

### Output Format

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ done
In important-only mode, add `[SEVERITY_FLAGS]` to the scanner template:

```bash
semgrep [--pro if available] --metrics=off [SEVERITY_FLAGS] --config [RULESET] --json -o [OUTPUT_DIR]/raw/[lang]-[ruleset].json --sarif-output=[OUTPUT_DIR]/raw/[lang]-[ruleset].sarif [TARGET] &
start_semgrep_scan [OUTPUT_DIR]/raw/[lang]-[ruleset].json [OUTPUT_DIR]/raw/[lang]-[ruleset].sarif env SEMGREP_ENABLE_VERSION_CHECK=0 semgrep [--pro if approved] --metrics=off [SEVERITY_FLAGS] --config [RULESET] --json -o [OUTPUT_DIR]/raw/[lang]-[ruleset].json --sarif-output=[OUTPUT_DIR]/raw/[lang]-[ruleset].sarif [TARGET] || SEMGREP_SCAN_LAUNCH_FAILED=1
```

Source the scan-status helper and require `wait_semgrep_scans` to pass as described in [scanner-task-prompt.md](scanner-task-prompt.md). Severity filtering never waives process-status or expected-artifact checks.

Where `[SEVERITY_FLAGS]` is:
- **Run all**: *(empty)*
- **Important only**: `--severity MEDIUM --severity HIGH --severity CRITICAL`
Loading
Loading