Repository navigation
fix(policy): gate MalwareBazaar test-module by default - #19
Conversation
With an Auth-Key set, MalwareBazaar's test-module posts a public comment on a sample. The global read list let any analyst run it without approval unless the config overrode it per instance. dbot now ships INTEGRATION_DESTRUCTIVE, a built-in per-integration list applied after the instance overrides and before the execution flag and global globs. Only an instance's policy.read can lift an entry. The example config no longer needs its own override. Closes #18
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Closes #18.
With an Auth-Key set, MalwareBazaar's
test-moduleposts a public comment ("test comment") on a sample. dbot's default read list includestest-module, so any MalwareBazaar instance without its own override let an analyst trigger that write without approval.Decision
Q2 on the progress dashboard, option A: dbot ships built-in per-integration defaults. Rejected alternatives:
test-moduleunless on a safe list: routine health checks would all need approval.Changes
dbot/control/config.py:INTEGRATION_DESTRUCTIVE = {"MalwareBazaar": ["test-module"]}, keyed by the catalog integration name.dbot/control/policy.py: new precedence step 3. The order is instance read, instance destructive, built-in per-integration destructive,execution: true, global destructive, global read, else destructive. Global policy can't lift a built-in entry; an instancepolicy.readcan, if the operator accepts the write.deploy/dbot.yaml.example: the malwarebazaar instance no longer needspolicy: {destructive: [test-module]}. The certified test (test_module_risk="destructive") now verifies the built-in rule instead of the example override.docs/configuration.md: precedence list and a note on the built-in list.read: ["*"]can't lift it, other integrations and other MalwareBazaar commands unaffected, instance read lifts it.Verification
tests/control/test_approvals.py:32error.Summary by CodeRabbit
New Features
test-modulecommand is classified as destructive by default, even when global rules allow read-only commands. Matching is case-insensitive, and an instance-level read policy can override this classification.Documentation