Giter Club home page Giter Club logo

Comments (9)

nimrodkor avatar nimrodkor commented on June 3, 2024

Hey @apeshimam !

This is the traceback, but it seems the actual error is missing. Is it KeyError?

from airiam.

apeshimam avatar apeshimam commented on June 3, 2024

yes sorry it is a KeyError.

from airiam.

apeshimam avatar apeshimam commented on June 3, 2024
-> % airiam recommend_groups

     ____      __           _____      ____     __        __
    / __ \    |__|  _  ____|_   _|    / __ \   |   \    /   |
   / /  \ \    __  | |/ ___| | |     / /  \ \  | |\ \  / /| |
  / /____\ \  |  | |   /     | |    / /____\ \ | | \ \/ / | |
 /  ______  \_|  |_|  |     _| |_  /  ______  \  |  \  /  | |
/_/        \_\_____|__|    |_____|/_/        \_\_|   \/   |_|
v0.1.57

AirIAM - Least privilege AWS IAM Terraformer

To continuously scan configurations, try the Bridgecrew free community plan.
https://www.bridgecrew.io

INFO:botocore.credentials:Found credentials in shared credentials file: ~/.aws/credentials
IAM FILE NAME ./aircache/829297642418/iam_data.json
Data account  id 829297642418
Reusing local data
INFO:root:Analyzing data for account 829297642418
INFO:root:Using the default UserOrganizer
Traceback (most recent call last):
  File "/usr/local/bin/airiam", line 5, in <module>
    run()
  File "/usr/local/lib/python3.9/site-packages/airiam/main.py", line 36, in run
    report_with_recommendations = recommend_groups(logger, runtime_results, args.last_used_threshold)
  File "/usr/local/lib/python3.9/site-packages/airiam/recommend_groups/recommend_groups.py", line 19, in recommend_groups
    runtime_iam_report.set_reorg(organizer.get_user_clusters(runtime_iam_report))
  File "/usr/local/lib/python3.9/site-packages/airiam/recommend_groups/recommend_groups.py", line 38, in get_user_clusters
    simple_user_clusters = self._create_simple_user_clusters(human_users, iam_data['AccountGroups'], iam_data['AccountPolicies'])
  File "/usr/local/lib/python3.9/site-packages/airiam/recommend_groups/recommend_groups.py", line 84, in _create_simple_user_clusters
    if PolicyAnalyzer.policy_is_write_access(policy_document):
  File "/usr/local/lib/python3.9/site-packages/airiam/find_unused/PolicyAnalyzer.py", line 49, in policy_is_write_access
    actions = PolicyAnalyzer._get_policy_actions(policy_document)
  File "/usr/local/lib/python3.9/site-packages/airiam/find_unused/PolicyAnalyzer.py", line 25, in _get_policy_actions
    actions_list.extend(PolicyAnalyzer.convert_to_list(statement['Action']))
KeyError: 'Action'

from airiam.

nimrodkor avatar nimrodkor commented on June 3, 2024

Hey @apeshimam !

This means the action is not part of this doc:
https://raw.githubusercontent.com/salesforce/policy_sentry/master/policy_sentry/shared/data/iam-definition.json
I wonder which action is it... Are you up for debugging?

from airiam.

apeshimam avatar apeshimam commented on June 3, 2024

sorry i just saw this. yeah up for it.

from airiam.

apeshimam avatar apeshimam commented on June 3, 2024

LMK how I can do this?

from airiam.

apeshimam avatar apeshimam commented on June 3, 2024

Hey @nimrodkor happy to help. what do you need from me.

from airiam.

apeshimam avatar apeshimam commented on June 3, 2024

@nimrodkor just wanted to checkin and see if I could help push this along. Thanks.

from airiam.

nimrodkor avatar nimrodkor commented on June 3, 2024

Hey @apeshimam , I looked into it and it seems this is an unexpected configuration - an Allow statement with no Action attribute - possibly this statement has a NotAction attribute, which is not a good practice.
It is not a good practice to have Allow with NotAction because it might lead to implicitly giving permissions.
Added a warning log, let me know if it solved your issue!

from airiam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.