security(agents): restrict read-only auditors to read-only Bash usage#735
Merged
Conversation
code-reviewer, dependency-auditor, qa-reviewer, and test-strategist held unrestricted Bash while being read-only reporters, allowing file writes, network calls, and package installs (least-privilege violation). Add a Tool Constraints section to each of the four agent bodies in both layers, limiting Bash to read-only diagnostic commands; dependency-auditor additionally standardizes side-effect-free audit flags. tools and permissionMode are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 내용
read-only 감사 에이전트 4개(
code-reviewer,dependency-auditor,qa-reviewer,test-strategist)의 본문에## Tool Constraints섹션을 추가하여,Bash를 읽기 전용 진단 명령으로 제한함을 명문화했다(plugin/+project/두 레이어, 총 8개 파일).배경
이 4개 에이전트는 description·본문상 "reports findings" 순수 read-only 역할인데
tools에 무제한Bash를 보유한다. 무제한Bash는 파일 쓰기(>,sed -i), 네트워크 호출(curl), 패키지 설치까지 허용하므로 read-only 계약과 모순되고 최소 권한(least-privilege) 원칙을 위반한다. 특히dependency-auditor의npm audit/pip-audit은 설치나 lockfile 변경을 유발할 여지가 있다.permissionMode가 미설정이라 allow된 환경에서는 별도 가드가 없다.구현
code-reviewer/qa-reviewer/test-strategist(6파일): 공통 가드 —Bash는git diff,git log, linter,tsc --noEmit같은 읽기 전용 진단 명령으로 한정하고, 파일 수정·패키지 설치·네트워크 호출 금지를 명시.dependency-auditor(2파일): audit 실행이 본질이므로,npm audit --package-lock-only· 설치 없는pip-audit· 읽기 전용cargo audit등 부작용 없는 플래그를 표준으로 명시하고, 설치·lockfile 변경·파일 쓰기·읽기 전용 취약점 DB 조회 외 네트워크 호출을 금지.## Reporting섹션 바로 앞에 삽입했고, plugin/project 사본에 동일 텍스트를 적용했다.검증
grep "## Tool Constraints"→ 대상 8개 파일만 매칭(나머지 4개 에이전트 미변경)scripts/check_agents.sh→check_agents: OK (8 agent pairs in sync)(sandbox OFF 기준)tools/permissionMode등 frontmatter는 변경하지 않음비고
적대적 검토(skeptic) 반영:
qa-reviewer의Bash전면 제거(과도)와 전역settings.json개입(범위 확대)은 의도적으로 배제하고, 4개 에이전트에 동일한 본문 가드 명문화로 통일했다.Closes #733
Part of #726