rungate 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hooks/ActionVerificationGate.hook.ts +96 -0
- package/hooks/AgentBriefGuard.hook.ts +38 -0
- package/hooks/AgentVerdictCapture.hook.ts +87 -0
- package/hooks/AutoVerifyGate.hook.ts +79 -0
- package/hooks/BashToolGuard.hook.ts +65 -0
- package/hooks/BashWriteGuard.hook.ts +60 -0
- package/hooks/CommitEnforcement.hook.ts +130 -0
- package/hooks/DocHygiene.hook.ts +148 -0
- package/hooks/GateEnforcement.hook.ts +58 -0
- package/hooks/GateResultProtection.hook.ts +69 -0
- package/hooks/HarnessAFKGate.hook.ts +85 -0
- package/hooks/HookCurrency.hook.ts +99 -0
- package/hooks/IssueCloseGuard.hook.ts +149 -0
- package/hooks/MergeGuard.hook.ts +58 -0
- package/hooks/PostCompact.hook.ts +60 -0
- package/hooks/ProjectStateSync.hook.ts +103 -0
- package/hooks/SkillGuard.hook.ts +69 -0
- package/hooks/SpecConformityTrigger.hook.ts +43 -0
- package/hooks/SpecSCGuard.hook.ts +123 -0
- package/hooks/StaleTTLCleanup.hook.ts +141 -0
- package/hooks/TaskCompleted.hook.ts +51 -0
- package/hooks/TeamInit.hook.ts +85 -0
- package/hooks/TestSuiteGuard.hook.ts +70 -0
- package/hooks/TestSuiteRelease.hook.ts +85 -0
- package/hooks/TopLevelCdGuard.hook.ts +108 -0
- package/hooks/VerifyPhaseLock.hook.ts +84 -0
- package/hooks/WorkflowStateGuard.hook.ts +40 -0
- package/hooks/lib/agent-config.json +9 -0
- package/hooks/lib/agentDetection.ts +201 -0
- package/hooks/lib/comment-template.ts +86 -0
- package/hooks/lib/findWorkflow.ts +101 -0
- package/hooks/lib/parseStdin.ts +37 -0
- package/hooks/lib/paths.ts +111 -0
- package/hooks/lib/utils.ts +338 -0
- package/lib/affected-tests.ts +29 -0
- package/lib/bash-write-guard.ts +373 -0
- package/lib/branch-cleanup.ts +279 -7
- package/lib/config-trackable.ts +9 -0
- package/lib/distribution-currency.ts +55 -5
- package/lib/failure-intake.ts +7 -1
- package/lib/gate-enforcement.ts +222 -28
- package/lib/gate-names.ts +72 -0
- package/lib/gate-result-protection.ts +427 -0
- package/lib/intake-sources.ts +380 -0
- package/lib/late-env-spawn.ts +331 -0
- package/lib/launch-base.ts +128 -5
- package/lib/paths.ts +96 -3
- package/lib/phase2-decomposition.ts +1 -1
- package/lib/published-artifact.ts +162 -18
- package/lib/sc-id-cross-tree.ts +84 -8
- package/lib/scaffold/ai-review-findings.ts +7 -1
- package/lib/scaffold/ai-review-step.ts +861 -116
- package/lib/scaffold/defaults.ts +82 -1
- package/lib/scaffold/steps.ts +436 -44
- package/lib/security-verdict.ts +1 -1
- package/lib/shell-path-interpolation.ts +594 -0
- package/lib/text-dependents.ts +875 -0
- package/lib/workflow-security.ts +29 -0
- package/lib/workflow-taint.ts +732 -0
- package/lib/worktree-cleanup.ts +65 -38
- package/lib/worktree-repo.ts +32 -2
- package/package.json +3 -1
- package/scripts/check-installed-hook-currency.ts +825 -0
package/lib/workflow-security.ts
CHANGED
|
@@ -54,6 +54,35 @@ export function pathRefusal(
|
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Single-quote a shell word (#1086).
|
|
59
|
+
*
|
|
60
|
+
* Single quotes are the only shell quoting with no interior expansion at all,
|
|
61
|
+
* so this is safe for a path containing a space, a `$`, a backtick or a
|
|
62
|
+
* newline alike. Double quotes stop at the space and leave the rest
|
|
63
|
+
* expanding, which is the cheapest wrong fix for #1086 and the shape a
|
|
64
|
+
* security review already caught once inside `gitDerivedStaging`.
|
|
65
|
+
*
|
|
66
|
+
* ## Why this lives here as well as in four workflow files
|
|
67
|
+
*
|
|
68
|
+
* `workflows/*.js` runs in a sandbox with no `require`, no dynamic `import()`
|
|
69
|
+
* and no filesystem (#69), so a workflow cannot load this module and must
|
|
70
|
+
* carry an inline copy — the same arrangement as `pathRefusal` above. This is
|
|
71
|
+
* the source of truth for those copies, and
|
|
72
|
+
* `test/workflow-prompt-top-level-cd.test.ts` runs every copy against the
|
|
73
|
+
* same inputs as this one and fails on any divergence. Change one, change
|
|
74
|
+
* them all.
|
|
75
|
+
*
|
|
76
|
+
* Before #1086 there was one copy, in `workflows/ship.js`, anchored to
|
|
77
|
+
* nothing: `lib/run-branch.ts` records that ship.js "owns `shellQuote`", and
|
|
78
|
+
* that was accurate while one file needed it. Four unanchored copies is a
|
|
79
|
+
* different proposition, which is why the ownership moved rather than being
|
|
80
|
+
* duplicated three more times.
|
|
81
|
+
*/
|
|
82
|
+
export function shellQuote(word: unknown): string {
|
|
83
|
+
return `'${String(word).replace(/'/g, "'\\''")}'`;
|
|
84
|
+
}
|
|
85
|
+
|
|
57
86
|
export function buildSafeGitAdd(filesChanged: string[]): string {
|
|
58
87
|
const validated = validateFilePaths(filesChanged);
|
|
59
88
|
if (validated.rejected.length > 0) {
|