Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing NotAction in Community Auditor - advanced_policy_elements.py #212

Open
ossie-git opened this issue Feb 28, 2022 · 1 comment
Open

Comments

@ossie-git
Copy link

Hi,

While looking at the source code for some of the auditors, I noticed that advanced_policy_elements.py mentions:

AWS documentation discourages the use of NotPrincipal, NotAction and
NotResource, particularly with Allow. These constructs, by default, grant
permissions, then Deny the ones explicitly listed. Instead, use an explicit
Resource, Action or Principal in your Allow list.

I expected to therefore see rules to detect all 3. However, I found 2 rules only:

  • one for NotPrincipal
  • one for NotResource

and couldn't find anything related to NotAction. This was confirmed when looking at the configuration of these included in config_override.yaml which only contains sections for NotPrincipal and NotResource:

NOTPRINCIPAL_WITH_ALLOW:
  title: NotPrincipal used with Allow effect
  description: NotPrincipal with Allow automatically grants the permission to all principals, except the ones specified.
  severity: MEDIUM
  group: CUSTOM

NOTRESOURCE_WITH_ALLOW:
  title: NotResource used with Allow effect
  description: NotResource with Allow automatically grants the Principal all services and resources that are not explicitly listed
  severity: MEDIUM
  group: CUSTOM

Is there a specific reason that there is no rule for NotAction? Am I missing something? Thanks.

@raghavkaul
Copy link
Contributor

raghavkaul commented Mar 20, 2022

I think NotAction would be a useful check since it implicitly grants permissions to all actions not listed in the NotAction statement. I just didn't get around to implementing it :)

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

No branches or pull requests

2 participants