AWS
awsAn agent with aws on its PATH can modify infrastructure. Memnox wraps the binary, reads the command before it runs, and matches it against the table below. Nothing here is a list of what we support: it is what the runtime already classifies, and the strings are the ones a rule matches on.
What it reads to authenticate
Discovery records that these exist and hashes them. It never reads a value, so a scan can say three agents reach this file and never what is inside it.
What it cannot undo
Every one of these carries the alternative a refusal names, which is why an agent takes the alternative and finishes the task instead of stopping.
aws s3 rb **aws.s3-rb- Denied, it names
aws s3 ls, then remove by handinstead. aws s3 rm --recursive **aws.s3-rm-recursive- Denied, it names
aws s3 rm one key at a timeinstead. aws iam delete-**aws.iamaws ec2 terminate-instances **aws.ec2-terminate-instancesaws rds delete-**aws.rdsaws cloudformation delete-stack **aws.cloudformation-delete-stack
What it changes
Allowed by default, and the obvious first thing to put behind ask.
aws iam **aws.iam- changes who can do what
What it only reads
Matched so a rule can say read is fine, rather than leaving it unspoken.
aws secretsmanager get-secret-value **aws.secretsmanager-get-secret-value- reads a secret value
aws sts get-caller-identityaws.sts-get-caller-identity- who am I
aws s3 ls **aws.s3-lsaws describe-**aws.runaws list-**aws.runaws get-**aws.run
The rule this writes
[[rules]] name = "aws-destructive-asks-first" match.actions = ["aws.s3-rb"] decision.effect = "ask" decision.reason = "This cannot be undone."
memnox protect --for aws writes this into memnox.policies.toml from the table above. You can edit it, and the file is yours.
Run npx memnox to find out whether AWS is actually reachable from your machine. It reads your own disk and needs no account.