Skip to content

feat(template): wire molecule-hitl + molecule-security-scan into roles (#266, #275) - #277

Merged
HongmingWang-Rabbit merged 1 commit into
mainfrom
fix/wire-security-plugins-to-roles
Apr 15, 2026
Merged

feat(template): wire molecule-hitl + molecule-security-scan into roles (#266, #275)#277
HongmingWang-Rabbit merged 1 commit into
mainfrom
fix/wire-security-plugins-to-roles

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Closes #266 and #275.

Install matrix

Role Plugin Why
Backend Engineer `molecule-hitl` Destructive DB migrations + runtime config changes need human approval
DevOps Engineer `molecule-hitl` Fly deploys + registry pushes + CI pipeline mutations need human approval
Security Auditor `molecule-hitl` Gates public issue filing for critical findings; stops false-positive spam
Security Auditor `molecule-security-scan` Primary consumer of gosec/bandit/CVE scanning from builtin_tools/security_scan.py

Security Auditor's `plugins:` list goes from 3 → 5. Backend + DevOps Engineer get their first role-specific `plugins:` block, layered on top of defaults per the PR #71 UNION merge semantics.

Verification

```
$ python3 -c 'import yaml; yaml.safe_load(open("org-templates/molecule-dev/org.yaml"))'
(no error)

Backend Engineer: ['molecule-hitl']
DevOps Engineer: ['molecule-hitl']
Security Auditor: ['molecule-skill-code-review', 'molecule-skill-cross-vendor-review', 'molecule-skill-llm-judge', 'molecule-security-scan', 'molecule-hitl']
```

NOT in this PR

Dev Lead / Research Lead / Technical Researcher / QA Engineer / UIUX Designer / PM / Documentation Specialist — none have destructive ops scope. Leaving narrow to avoid HITL-prompt fatigue on read-only roles.

Test plan

  • YAML parses
  • Walk-script confirms the three edited roles have the expected plugin lists
  • Next `POST /org/import` activates the plugins in tenant containers
  • Agents invoke `request_approval` / `security_scan` after re-import

🤖 Generated with Claude Code

#266, #275)

Closes #266 and #275. Per-role install matrix matching the per-tick
#266 triage comment.

## Added plugins

| Role | Plugin | Rationale |
|---|---|---|
| Backend Engineer | molecule-hitl | Scope includes destructive DB migrations + runtime config changes — @requires_approval stops unattended agents from shipping prod schema mutations. |
| DevOps Engineer | molecule-hitl | Scope covers fly deploys + registry pushes + CI pipeline mutations — @requires_approval before destructive infra ops. |
| Security Auditor | molecule-hitl | Gates public issue filing for critical findings; prevents false-positive spam of the tracker. |
| Security Auditor | molecule-security-scan | Primary consumer of gosec/bandit/CVE scanning via builtin_tools/security_scan.py. Security Auditor system prompt already expects to run these tools; this wires them. |

## Per-PR #71 semantics
Each workspace's `plugins:` UNIONs with `defaults.plugins` — these
additions don't drop any existing plugin. Security Auditor's list went
from 3 → 5; Backend + DevOps Engineer now have a role-specific list
layered on top of defaults.

## NOT adding (yet)
Dev Lead / Research Lead / Technical Researcher / QA Engineer / UIUX
Designer / PM / Documentation Specialist — none have destructive ops
scope in the role description. If you want belt-and-suspenders HITL
coverage I can extend this PR; leaving narrow for now.

## Test plan
- [x] YAML parses cleanly (python3 -c 'import yaml; yaml.safe_load(...)')
- [x] Three edited roles' plugins lists verified by walk-script
- [ ] Next org re-import activates the plugins on each workspace container
- [ ] Agents invoke request_approval / security_scan from their system
      prompts after re-import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

template: wire molecule-hitl plugin into applicable roles in org.yaml after PR #262

1 participant