Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"plugins": [
{
"name": "genie",
"version": "4.260522.9",
"version": "4.260522.12",
"source": "./plugins/genie",
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/audit-next-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
- name: Checkout (with tags)
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/binary-sha-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Verify pinned SHA-256 against upstream
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-tarballs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
runner: macos-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-orphan-alert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/release-orphan-alert.yml"

echo "== File =="
wc -l "$FILE"
echo

echo "== Lines 1-120 =="
nl -ba "$FILE" | sed -n '1,140p'

echo
echo "== Find actions/checkout usage =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

echo
echo "== Find persist-credentials / token / git commands =="
rg -n "persist-credentials|with:\s*$|token:|git\s+(fetch|tag|log|push)" "$FILE" || true

Repository: automagik-dev/genie

Length of output: 202


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/release-orphan-alert.yml"

echo "== checkout usages =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

echo
echo "== persist-credentials / token / checkout inputs around checkout =="
sed -n '35,80p' "$FILE" | cat -n

echo
echo "== Find persist-credentials / token / git commands in whole file =="
rg -n "persist-credentials|token:|with:\s*|git\s+(fetch|tag|log|push)" "$FILE" || true

echo
echo "== Show full file with line numbers (small enough) =="
cat -n "$FILE"

Repository: automagik-dev/genie

Length of output: 8105


🌐 Web query:

GitHub actions/checkout persist-credentials default value true/false documentation

💡 Result:

The persist-credentials input in actions/checkout defaults to true. The action’s README states: “Whether to configure the token or SSH key with the local git config” and shows “# Default: true” for persist-credentials. [1][2][3] If you set persist-credentials: false, the token is not persisted in the local git config (and is intended to be opted out of); otherwise the token/credentials are persisted for subsequent steps and are removed during post-job cleanup. [1][3]

Citations:


Pin actions/checkout and disable credential persistence in this read-only job

.github/workflows/release-orphan-alert.yml line 46 uses the mutable actions/checkout@v5, and actions/checkout defaults persist-credentials to true, so it configures GITHUB_TOKEN credentials for git even though the workflow only does read-only git operations (git fetch/git tag/git log) and never pushes.

Suggested patch
-      - uses: actions/checkout@v5
+      - uses: actions/checkout@<full-commit-sha-for-v5>
+        with:
+          persist-credentials: false
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 46-46: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 46-46: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-orphan-alert.yml at line 46, The workflow
currently uses the mutable reference "uses: actions/checkout@v5" and leaves
credential persistence on; update that step to a pinned reference (replace the
mutable tag with a fixed version or full commit SHA for actions/checkout) and
add a with: block setting persist-credentials: false so the job does not
configure GITHUB_TOKEN for read-only operations; target the checkout step that
currently reads "uses: actions/checkout@v5" and change it to a pinned ref and
include persist-credentials: false.


- name: Scan tags vs releases
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/release-publish.yml"
echo "== File = $FILE =="
test -f "$FILE" || { echo "Missing $FILE"; exit 1; }

echo "== Checkout occurrences =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

echo "== Lines around checkout@v5 =="
# Print a tight window around first occurrence(s)
rg -n "uses:\s*actions/checkout@v5" "$FILE" | cut -d: -f1 | head -n 20 | while read -r ln; do
  start=$((ln-10)); end=$((ln+10));
  echo "--- around line $ln ($start-$end) ---"
  sed -n "${start},${end}p" "$FILE" | nl -ba -w2 -s' | ' 
done

echo "== persist-credentials / git push presence =="
rg -n "persist-credentials|git push|push origin|checkout@v" "$FILE" || true

echo "== timeout-minutes presence =="
rg -n "timeout-minutes" "$FILE" || true

echo "== caching keys presence =="
rg -n "actions/cache|cache" "$FILE" || true

Repository: automagik-dev/genie

Length of output: 303


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/release-publish.yml"

echo "== Checkout occurrences =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

echo "== Context around actions/checkout@v5 (line(s) found) =="
rg -n "uses:\s*actions/checkout@v5" "$FILE" | cut -d: -f1 | head -n 20 | while read -r ln; do
  start=$((ln-15)); end=$((ln+15));
  echo "--- around line $ln (${start}-${end}) ---"
  sed -n "${start},${end}p" "$FILE"
done

echo "== persist-credentials / git push presence =="
rg -n "persist-credentials|git push|push origin|checkout@" "$FILE" || true

echo "== timeout-minutes presence =="
rg -n "timeout-minutes" "$FILE" || true

echo "== caching keys presence =="
rg -n "actions/cache|cache" "$FILE" || true

Repository: automagik-dev/genie

Length of output: 1631


🏁 Script executed:

#!/bin/bash
set -euo pipefail
FILE=".github/workflows/release-publish.yml"

echo "== persist-credentials occurrences =="
rg -n "persist-credentials" "$FILE" || true

echo "== git push occurrences =="
rg -n "git push" "$FILE" || true
rg -n "push origin" "$FILE" || true

echo "== checkout step options near line 97 =="
sed -n '90,110p' "$FILE" | nl -ba -w2 -s' | ' || sed -n '90,110p' "$FILE"

echo "== Context around git push (around first match) =="
first=$(rg -n "git push" "$FILE" | head -n1 | cut -d: -f1 || true)
if [[ -n "${first:-}" ]]; then
  start=$((first-25)); end=$((first+25));
  sed -n "${start},${end}p" "$FILE"
fi

echo "== Any other actions/checkout uses (including non-v5) =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

Repository: automagik-dev/genie

Length of output: 2584


Pin actions/checkout to an immutable commit SHA (don’t use mutable @v5) in the release publish workflow.

The workflow uses actions/checkout@v5 at the checkout step; since it later runs git push origin main, keep credentials behavior as-is and address the supply-chain risk by SHA-pinning.

Suggested patch
-      - uses: actions/checkout@v5
+      - uses: actions/checkout@<full-commit-sha-for-v5>
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 97-97: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 97-97: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-publish.yml at line 97, Replace the mutable ref
"uses: actions/checkout@v5" with the immutable commit SHA for the
actions/checkout v5 release (e.g. "uses: actions/checkout@<commit-sha>") to
mitigate supply-chain risk; fetch the exact SHA from the actions/checkout
repository tag for v5 and update the line, keeping any existing "with:" inputs
(such as persist-credentials or token) unchanged so credentials/behavior remain
identical.


- name: Resolve upstream sign-attest run-id
id: src
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sign-attest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
- darwin-arm64

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/sign-attest.yml"
echo "== File: $FILE =="
ls -l "$FILE"

echo "== Lines around 198 =="
nl -ba "$FILE" | sed -n '160,230p'

Repository: automagik-dev/genie

Length of output: 277


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/sign-attest.yml"

echo "== Lines around 198 =="
awk 'NR>=175 && NR<=215 {printf "%4d: %s\n", NR, $0}' "$FILE"

Repository: automagik-dev/genie

Length of output: 1921


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/sign-attest.yml"

echo "== Matching persist-credentials =="
rg -n "persist-credentials" "$FILE" || true

echo "== Matching actions/checkout@ =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

echo "== Matching secrets usage =="
rg -n "secrets\." "$FILE" || true

echo "== Matching caches =="
rg -n "cache|actions/cache" "$FILE" || true

echo "== Print sign job steps (approx) =="
# Print from start of sign job through a bit further so we can see checkout's `with:` block if present.
awk 'NR>=160 && NR<=280 {print NR ":" $0}' "$FILE"

Repository: automagik-dev/genie

Length of output: 6082


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/sign-attest.yml"

echo "== Any git push/commit/config usage =="
rg -n "git (push|commit|config|add)" "$FILE" || true

echo "== Any actions/checkout usage count =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

Repository: automagik-dev/genie

Length of output: 179


Harden checkout in the signing job (pin immutable SHA + disable persisted credentials).

In .github/workflows/sign-attest.yml line 198 the job uses actions/checkout@v5 unpinned, and there’s no persist-credentials: false. Since this sign job doesn’t commit/push anything, disabling credential persistence is appropriate.

Suggested patch
-      - uses: actions/checkout@v5
+      - uses: actions/checkout@<full-commit-sha-for-v5>
+        with:
+          persist-credentials: false
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 198-198: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 198-198: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/sign-attest.yml at line 198, The checkout action in the
sign job is unpinned and leaves credentials persisted; update the checkout step
(the uses: actions/checkout@v5 entry inside the sign job) to a pinned immutable
commit (replace the tag with the full commit SHA for the actions/checkout v5
release) and add a with: block containing persist-credentials: false (and
optionally fetch-depth: 0) so no credentials are stored for a job that does not
push commits.


- name: Download tarball artifact (${{ matrix.platform }})
uses: actions/download-artifact@v4
Expand Down
4 changes: 3 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
".worktrees",
".claude",
"plugins/genie/scripts",
".docs-vendor"
".docs-vendor",
"docs",
"test-fixtures/symlink-cycle/real/cycle"
]
},
"overrides": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automagik/genie",
"version": "4.260522.9",
"version": "4.260522.12",
"description": "Collaborative terminal toolkit for human + AI workflows. NOTE: npm distribution discontinued 2026-05-09 — install via `curl -fsSL https://raw.githubusercontent.com/automagik-dev/genie/main/install.sh | bash` (cosign + SLSA verified). See https://automagik.dev/genie/release-process",
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/genie/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genie",
"version": "4.260522.9",
"version": "4.260522.12",
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.",
"author": {
"name": "Namastex Labs"
Expand Down
2 changes: 1 addition & 1 deletion plugins/genie/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genie-plugin",
"version": "4.260522.9",
"version": "4.260522.12",
"private": true,
"description": "Runtime dependencies for genie bundled CLIs",
"type": "module",
Expand Down
15 changes: 15 additions & 0 deletions src/genie-commands/__tests__/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
ensureCanonicalInstall,
fetchLatestManifest,
formatVerifyBanner,
isGenieProcessSnapshotLine,
manifestUrlForChannel,
normalizeVersion,
persistChannel,
Expand Down Expand Up @@ -871,6 +872,20 @@ describe('Diagnostics schema (G5)', () => {
expect(source).toContain('previousBackup: ctx.previousBackup');
});

test('diagnostics process snapshot excludes pgserve/autopg noise and keeps Genie serve lines', () => {
expect(
isGenieProcessSnapshotLine(
'2554274 1 2554274 Ssl 0.0 0.4 00:08:00 /home/genie/.local/bin/genie serve start --daemon',
),
).toBe(true);
expect(
isGenieProcessSnapshotLine(
'2588570 171462 2588570 Rsl 1.0 2.8 3-12:34:22 bun /home/genie/.bun/install/global/node_modules/pgserve/bin/postgres-server.js postmaster --port 8432',
),
).toBe(false);
expect(isGenieProcessSnapshotLine('2588570 1 2588570 S postgres -D /home/genie/.genie/data/pgserve')).toBe(false);
});

test('NO_COLOR honored via colorEnabled() helper', () => {
const source = readFileSync(join(__dirname, '..', 'update.ts'), 'utf-8');
expect(source).toContain('process.env.NO_COLOR');
Expand Down
26 changes: 21 additions & 5 deletions src/genie-commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,26 @@ function summarizeJsonlSignals(path: string): RecentLogSignal[] {
return [...signals.values()].sort((a, b) => b.count - a.count).slice(0, 10);
}

export function isGenieProcessSnapshotLine(line: string): boolean {
if (/pgserve|autopg|postgres-server\.js|postgres -D /.test(line)) return false;
return (
line.includes(' serve start ') ||

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The trailing space in ' serve start ' makes the filter fragile. If the genie serve start command is invoked without additional arguments (like --daemon), the line.trim() call on line 1251 will remove any trailing whitespace from the ps output, causing this includes check to fail. Removing the trailing space ensures it matches both cases correctly.

Suggested change
line.includes(' serve start ') ||
line.includes(' serve start') ||

line.includes('/dist/genie.js') ||
line.includes('/src/genie.ts') ||
line.includes('tmux -L genie-tui')
);
}

function collectGenieProcessSnapshot(): string | null {
const snapshot = safeExec('ps -axo pid,ppid,pgid,stat,pcpu,pmem,etime,command -r', 2000)
.split(/\r?\n/)
.map((line) => line.trim())
.filter(Boolean)
.filter(isGenieProcessSnapshotLine)
.join('\n');
return snapshot || null;
}

interface UpdateDiagnosticsExtras {
verify: VerifyResult;
cleanups: CleanupReport;
Expand Down Expand Up @@ -1297,11 +1317,7 @@ async function collectUpdateDiagnostics(
tuiCrashLog,
},
processSnapshot: {
genie:
safeExec(
"ps -axo pid,ppid,pgid,stat,pcpu,pmem,etime,command -r | rg -i 'dist/genie.js|/src/genie.ts|pgserve|postgres -D .*\\.genie/data/pgserve|tmux -L genie-tui|bun' || true",
2000,
) || null,
genie: collectGenieProcessSnapshot(),
tuiTmux: safeExec('tmux -L genie-tui ls 2>/dev/null || true', 1000) || null,
},
maintenance: {
Expand Down
Loading