Repository navigation
chore(org-sync): sync Heretek-AI/.github@f27b1cc standards (tier-1 / node-zerodep) - #75
BillyOutlast wants to merge 1 commit into
Conversation
Signed-off-by: BillyOutlast <172061051+BillyOutlast@users.noreply.github.com>
Reviewer's GuideConfigurationPin the four reusable GitHub workflows to the organization’s standardized commit so these callers use the same shared workflow revision.
DocumentationAdd the adversarial-audit skill, which guides agents in producing a repository-specific three-subagent audit prompt grounded in real integrations and testable claims.
Add the Spoonfeeder skill, which guides agents through verifying assumptions and writing a milestone-based implementation brief for another agent.
Update the security-review skill’s PR-range Gitleaks command to pass the commit range directly, without the
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 1
Please check the settings in the CodeRabbit UI or the
|
|
There was a problem hiding this comment.
Hey - I've found 10 issues
Sourcery assessment
Needs a human reviewer. 10 findings to address first, and the new commit pins change which reusable GitHub Actions workflows execute, including the OCR review workflow that receives OCR_LLM_TOKEN. If the new revision mishandles that token or performs an unintended external action, reverting the pins stops future runs but cannot undo access or actions that already occurred.
Blocking findings: .agents/skills/security-review/SKILL.md:31, .agents/skills/adversarial-audit-prompt/SKILL.md:151, .agents/skills/spoonfeeder/SKILL.md:30, .agents/skills/spoonfeeder/SKILL.md:81, .agents/skills/adversarial-audit-prompt/SKILL.md:151, and 5 more
| - Secrets & hygiene — pick the scanner mode that matches what you are reviewing: | ||
| - Pre-commit or staged-change check: `gitleaks protect --staged --redact --no-banner` | ||
| - PR branch or repository review (scans commits in range, not just the index): `gitleaks detect --source . --log-opts="--diff-merges=separate $(git merge-base origin/main HEAD)..HEAD" --redact --no-banner`. Substitute the real upstream base ref (for example `origin/trunk`) and omit `--log-opts` only when you intend to scan the entire history. `--no-git` (directory mode) remains available for non-git artifacts such as release tarballs. | ||
| - PR branch or repository review (scans commits in range, not just the index): `gitleaks detect --source . --log-opts="$(git merge-base origin/main HEAD)..HEAD" --redact --no-banner`. Substitute the real upstream base ref (for example `origin/trunk`) and omit `--log-opts` only when you intend to scan the entire history. `--no-git` (directory mode) remains available for non-git artifacts such as release tarballs. |
There was a problem hiding this comment.
🟡 Medium · Merge-resolution secrets go undetected
When the reviewed range contains a merge commit whose resolution introduces a secret absent from its parent commits, gitleaks detect passes the revision range to Git without requesting merge diffs, so Git omits the merge-resolution changes and Gitleaks reports no finding for the secret.
Restore --diff-merges=separate in the --log-opts revision range.
| - {{SPEC_ORIGIN}} Build gates that only check spec compliance cannot catch invented facts (API names, image tags, config shapes) in the spec. Matching the spec is not the same as working. Where the spec and reality disagree, reality wins and the spec is the defect. | ||
|
|
||
| ### The Third Rule: SABOTAGE EVERY CRITICAL INVARIANT | ||
| - For each invariant marked **[S]** in section 3, break it with a one-line change in `$AUDIT_TMP/wt`, run the full suite there, and record whether the suite went red. Restore the line after each run. |
There was a problem hiding this comment.
🟠 High · Repository commands access host resources
When a repository being audited contains a malicious test, install, or lifecycle script, a Git worktree isolates file edits but not process execution. A repository-controlled test suite or package lifecycle script therefore runs with the auditor’s filesystem, network, and environment access, allowing it to read or exfiltrate credentials or alter files outside the scratch area.
Require all repository-controlled commands and package installs to run in a disposable OS/container sandbox with credentials removed, host files unmounted, and network access disabled or explicitly restricted.
Also at .agents/skills/spoonfeeder/SKILL.md:26.
|
|
||
| 1. Read everything the user pointed at: repos, prior art, other models' proposals. | ||
| 2. **Fact-check every claim you were handed**: CLI flags, API names, version numbers, counts. Check them against the installed tool, its `--help`, its type definitions or its source, never against memory or docs websites, which often describe an older major version. | ||
| - Install the exact pinned version if you can (`npm i <pkg>@<ver>`, `pip install`, and so on). |
There was a problem hiding this comment.
🟠 High · Dependency install exposes host credentials
When an agent follows the installation advice for a package selected from an untrusted repository or specification, the package manager executes the dependency’s install or build scripts with the agent’s local permissions, letting a malicious or compromised package read accessible credentials or alter files on the host.
Require dependency installs and package-supplied commands to run in a disposable, credential-free sandbox, or verify the package’s trustworthiness before running them on the host.
| - stop after 3 failed attempts on the same error and write down what was tried, | ||
| - any hard "never do X" rules the spike uncovered. | ||
| 3. **Paths and setup.** | ||
| - The exact absolute paths on the user's machine, as the user gave them. |
There was a problem hiding this comment.
🟡 Medium · Machine paths leak into PR
When a user supplies a sensitive local path and the target repository or PR is visible to other people, the brief includes the user’s exact local paths, and the delivery instructions then publish that brief in a PR, exposing usernames or sensitive directory names to repository viewers.
Require explicit approval before publishing machine-specific paths, and replace them with placeholders in any brief committed to a shared repository.
Also at .agents/skills/spoonfeeder/SKILL.md:117.
| - {{SPEC_ORIGIN}} Build gates that only check spec compliance cannot catch invented facts (API names, image tags, config shapes) in the spec. Matching the spec is not the same as working. Where the spec and reality disagree, reality wins and the spec is the defect. | ||
|
|
||
| ### The Third Rule: SABOTAGE EVERY CRITICAL INVARIANT | ||
| - For each invariant marked **[S]** in section 3, break it with a one-line change in `$AUDIT_TMP/wt`, run the full suite there, and record whether the suite went red. Restore the line after each run. |
There was a problem hiding this comment.
🟡 Medium · Concurrent sabotage results are unreliable
When subagents sabotage invariants or run tests in the shared worktree at the same time, the subagents can test each other's changes or restore another agent's sabotage, so the reported suite results do not establish whether the tested invariant was caught.
Give each subagent its own disposable worktree for sabotage and test runs.
Also at .agents/skills/adversarial-audit-prompt/SKILL.md:128, .agents/skills/adversarial-audit-prompt/SKILL.md:183.
| **Auditor Formation**: three independent adversarial subagents (Alpha, Beta, Gamma), a cross-examination pass, and a synthesis pass | ||
| **Output**: `AUDIT_REPORT_FINDINGS.md` at the repository root | ||
|
|
||
| This prompt is designed to be re-run. Each run audits the current `HEAD`, re-verifies every finding of the previous run, and overwrites `AUDIT_REPORT_FINDINGS.md`. |
There was a problem hiding this comment.
🟡 Medium · Older audit results replace newer findings
When audit runs overlap against the same checkout and the older run finishes last, both controllers write AUDIT_REPORT_FINDINGS.md without checking which baseline is current, so the older run overwrites the newer report and its findings disappear.
Publish reports separately per run and only update the shared report when its baseline is still current.
| ## 0. Preflight (the controller does this before spawning subagents) | ||
|
|
||
| 1. **Baseline.** Record at the top of the report: `git rev-parse HEAD`, `git log -1 --format='%ci %s'`, the UTC date, and the versions of every tool you will use ({{TOOLS}}). If `git status --porcelain` shows changes other than this prompt file and a previous report, list the dirty files and audit a clean `git worktree` of `HEAD` instead of the working tree. | ||
| 2. **Scratch space.** `export AUDIT_TMP="$(mktemp -d -t {{REPO}}-audit-XXXXXX)"`. Every clone, downloaded binary, packed tarball, sabotage copy, container volume and raw log goes under `$AUDIT_TMP`. Each subagent writes its raw notes to `$AUDIT_TMP/{alpha,beta,gamma}.md`. |
There was a problem hiding this comment.
🟡 Medium · Audit setup fails for owner/repo names
When {{REPO}} is filled with the conventional GitHub repository identifier owner/repo, the generated mktemp -t template contains a slash, so mktemp treats owner/repo-audit-XXXXXX as a path with a nonexistent parent and exits before the audit starts.
Use a fixed slash-free mktemp prefix, or sanitize {{REPO}} to a slash-free slug before inserting it.
| ## 5. Execution Directives for OpenCode | ||
|
|
||
| 1. **Independent exploration.** Spawn Alpha, Beta and Gamma concurrently as three separate subagents. Hand each one this entire file plus its role. They must not read each other's notes until step 4. Each one works through the claims it owns (ownership is marked `[A]`, `[B]`, `[G]` in section 3) and may file findings on any claim. | ||
| 2. **Run things.** Prefer executing to reading. Use the recipes in section 4 and any further commands you need (`git ls-remote`, `curl`, `jq`, `rg`{{EXEC_EXTRA}}). Save the raw output of every command you cite under `$AUDIT_TMP/logs/`. |
There was a problem hiding this comment.
🟡 Medium · Command logs cannot be saved
When an auditor saves a command's output under the prescribed path before creating the logs directory, the instructions direct auditors to save output under $AUDIT_TMP/logs/, but preflight creates only $AUDIT_TMP; a command that redirects output there fails because the logs directory does not exist, losing the required raw evidence.
Create $AUDIT_TMP/logs during preflight before directing auditors to write command output there.
|
|
||
| ## 0. Preflight (the controller does this before spawning subagents) | ||
|
|
||
| 1. **Baseline.** Record at the top of the report: `git rev-parse HEAD`, `git log -1 --format='%ci %s'`, the UTC date, and the versions of every tool you will use ({{TOOLS}}). If `git status --porcelain` shows changes other than this prompt file and a previous report, list the dirty files and audit a clean `git worktree` of `HEAD` instead of the working tree. |
There was a problem hiding this comment.
🟡 Medium · Audit evidence can target another commit
When the checked-out branch advances after baseline capture but before worktree creation, the baseline records the current HEAD, but the later worktree command resolves HEAD again. If the branch advances between those steps, tests run against a different commit than the one recorded in the report, so the audit's evidence is attributed to the wrong revision.
Capture HEAD once in a variable and use that exact SHA for both the baseline and worktree creation.
Also at .agents/skills/adversarial-audit-prompt/SKILL.md:128.
| - for upstream comparisons, the upstream file path and commit SHA you compared against. | ||
| 4. **Cross-examination.** When all three are done, each finding is handed to a different subagent (Alpha's to Beta, Beta's to Gamma, Gamma's to Alpha), whose job is to refute it: re-run the proof, look for a misreading, a wrong upstream version, or an environment artifact. A refuted finding is dropped or downgraded, and the refutation is noted in the finding. | ||
| 5. **Coverage gate.** Before synthesis, check that every claim ID in section 3 has a status. Any claim without one goes back to its owner. | ||
| 6. **Synthesis.** The controller writes `AUDIT_REPORT_FINDINGS.md` in the structure below, then cleans up (`git worktree remove`, stop any containers or processes you started) and confirms the real checkout has no changes apart from the report and this prompt file. |
There was a problem hiding this comment.
🟡 Medium · Audit scratch data persists
When an audit reaches the cleanup step, the cleanup removes the worktree but never deletes $AUDIT_TMP, so cloned source, downloaded artifacts, raw logs, and notes remain on disk after the audit.
After successfully removing the worktree and stopping processes, remove $AUDIT_TMP so the audit's scratch files do not persist.



What and why
Automated organization standardization sync from
Heretek-AI/.github@f27b1cc01ec712c15e73e14e363457dcddd1f524(tier:1, profile:node-zerodep).lefthook.ymlto thenode-zerodepLefthook v2 job profile.editorconfig(missing) or refreshes it (fleet-managed marker; custom files kept)biome.jsonc(bun-biome) /ruff.toml(python-uv) when the repo has no formatter config.coderabbit.yamlwithinheritance: trueand thechore(org-sync)title keyword so org-sync PRs are excluded from CodeRabbit auto-review (custom files without the managed marker are left alone).agents/skills/(with.opencode/skills,.claude/skills, and.github/skillsdiscovery symlinks).claude/hooks/*.sh+ marker-gated.claude/settings.json;.claude/settings.local.jsonis never touched)hygiene.yml/ocr.yml/dead-code-and-deps.yml/code-quality.ymlcallers and bumps reusable workflow pins (Heretek-AI/.github/.github/workflows/*) tof27b1cc01ec712c15e73e14e363457dcddd1f524(skipped when the repository setssync_workflows: false)uses:refs to full-length commit SHAs (orgsha_pinning_required)Evidence
Linked issues
Tracked by
Heretek-AI/.githuborganization standardization.Summary by Sourcery
Adopt the organization’s updated Node zero-dependency standards for agent guidance and reusable workflow pins.
New Features:
Bug Fixes:
--log-opts.Enhancements:
Chores: