autodoc: rewrite workflow to be self-contained (no uv)#495
Conversation
abccc4a to
26b0c94
Compare
|
Claude finished @jdcmsd's task in 1m 58s —— View job Review: autodoc self-contained rewrite
The rewrite is well-structured and the slug/UUID validation guards are a genuine improvement. A few things worth a second look, ordered by severity. 🔴 High — Prompt injection into a Bash-enabled agent holding write secrets
The
Since Claude has This is the core risk of the design, not a regression, but the rewrite keeps it. Worth considering:
🔴 High — Secret over-provisioning to the Claude stepEven setting injection aside, the
🟠 Medium — Report is committed last, after the fragile network callsThe durable record (git commit of the report, lines 292-298) runs after the dotCMS 🟠 Medium —
|
- Fix -f → -F on gh api PATCH so the file is read, not sent literally - Prepend <!-- autodoc-report --> marker in finalize before posting so idempotent edit lookup works (marker was not in the report itself) - Add --paginate to comment lookup to search beyond the first page - Use jq first // empty instead of | head -1 to avoid SIGPIPE - Fix urlTitle awk to use sub() consistent with title/tags/seoDescription - Remove -k (TLS bypass); add --fail-with-body to dotCMS curl calls - Add comment clarifying AUTODOC_DOTCMS_API_TOKEN_AISEARCH is used by the Claude subprocess via burlap.txt, not directly by a workflow step
- Make git push conditional on commit succeeding (|| true was causing unconditional push even when there was nothing new to commit) - Add git push origin HEAD for explicit branch targeting - Validate urlTitle is a URL slug before interpolating into JSON query (non-slug chars would break the shell-built -d payload) - Validate IDENTIFIER matches UUID format before placing in URL - Add comment on unpinned npm install explaining the tradeoff
Rewrites the
issue_autodoc.ymlworkflow to eliminate theuv/ Python-script dependency, making it self-contained.What changed:
Set up uv,Install autodoc dependencies,uv run python finalize.pystepsghCLI in a heredoc (no pip, no venv)claude --print --allowedTools Bash,Write < /tmp/eval_context.mdgh issue commentfor posting;curlfor dotCMS EDIT/NEW;git pushfor committingprompts/burlap.txtdirectly (no YAML parsing)This mirrors the change in
dotCMS/corePR dotCMS#36294 and resolves the ordering dependency on the dotcms-aios PR.