Skip to content

fix: close 2 pentest findings -- CI workflow guard + pipe injection#154

Merged
fazxes merged 2 commits intomainfrom
fix/pentest-ci-workflow-guard-and-pipe-injection
Apr 6, 2026
Merged

fix: close 2 pentest findings -- CI workflow guard + pipe injection#154
fazxes merged 2 commits intomainfrom
fix/pentest-ci-workflow-guard-and-pipe-injection

Conversation

@fazxes
Copy link
Copy Markdown
Member

@fazxes fazxes commented Apr 6, 2026

Summary

  • Finding 1 (CI workflow files unguarded): .github/workflows/ci.yml and notify-orbitweb.yml were absent from PROMPT_GUARD_FILES. An agent PR could modify these to strip lint/mypy enforcement or exfiltrate ORBITWEB_PAT. Fixed: added both files to PROMPT_GUARD_FILES; added .github/workflows to PROMPT_GUARD_DIRS to catch future new workflow files.
  • Finding 2 (FEATURE/PR_URL pipe injection): FEATURE and PR_URL extracted from agent log output were injected into the session index markdown table without stripping |. Extra pipe chars create extra table cells, causing parse_session_index to silently drop the row and corrupt role-selection counters (count_consecutive_role, count_sessions_since_role). Fixed: tr -d '|' on both values before injection, matching existing PR_TITLE/PR_BRANCH sanitization.
  • Watch finding (fix: deep-merge list fields in merge_config #3): Modifications to existing files in docs/prompt/feedback/ are undetected by the guard snapshot. Already tracked as task fix: permanently deploy pentest fixes via all-PR strategy (4th attempt) #157 — no new task needed.

Test plan

  • make check passes
  • Verify PROMPT_GUARD_FILES contains both .github/workflows/*.yml paths in lib-agent.sh
  • Verify PROMPT_GUARD_DIRS contains .github/workflows in lib-agent.sh
  • Verify tr -d '|' applied to FEATURE and PR_URL in daemon.sh before index write

fazxes added 2 commits April 6, 2026 13:22
Finding 1 (CI workflow files unguarded):
  .github/workflows/ci.yml and notify-orbitweb.yml were absent from
  PROMPT_GUARD_FILES. An agent PR could remove mypy, silence lint, or
  exfiltrate the ORBITWEB_PAT via a modified notify workflow. Fixed by
  adding both files to PROMPT_GUARD_FILES and .github/workflows to
  PROMPT_GUARD_DIRS (catches future new workflow files too).

Finding 2 (FEATURE/PR_URL pipe injection):
  FEATURE and PR_URL were injected into the session index markdown table
  without stripping pipe chars. A pipe in the agent's Built:/PR: output
  would create extra cells, causing parse_session_index to silently drop
  the row, undercounting consecutive roles and corrupting role selection.
  Fixed by tr -d '|' on both values before injection, matching the
  existing sanitization applied to PR_TITLE/PR_BRANCH.

Watch finding (#3 in pentest): already tracked as task #157.
…TURE/PR_URL

- Add comment at daemon.sh early-exit path clarifying FEATURE is always
  unset at that point (safe, but fragile if code order changes)
- Expand tr -d to strip newlines as well as pipes from FEATURE and PR_URL
  (multiline Built:/PR: values would also corrupt the session index)
- Create tasks #158 and #159 for remaining advisory notes:
  dynamic workflow guard expansion, PROMPT_GUARD_DIRS non-recursive doc
@fazxes fazxes merged commit d9f0eac into main Apr 6, 2026
7 checks passed
@fazxes fazxes deleted the fix/pentest-ci-workflow-guard-and-pipe-injection branch April 6, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant