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

Bug: run iam__enum_permissions fails with UnboundLocalError #445

Open
johnathanhuutri opened this issue Jul 20, 2024 · 0 comments
Open

Bug: run iam__enum_permissions fails with UnboundLocalError #445

johnathanhuutri opened this issue Jul 20, 2024 · 0 comments

Comments

@johnathanhuutri
Copy link

Tested on ubuntu 24.04 and parrot, both return same error:

Pacu (test:imported-myuser) > run iam__enum_permissions 
  Running module iam__enum_permissions...
[iam__enum_permissions] Confirming permissions for users:
[iam__enum_permissions]   myuser...
[iam__enum_permissions]     List groups for user failed
[iam__enum_permissions]       FAILURE: MISSING REQUIRED AWS PERMISSIONS
[iam__enum_permissions]     Get user policy failed
[iam__enum_permissions]       FAILURE: MISSING REQUIRED AWS PERMISSIONS

[2024-07-20 09:52:55] Pacu encountered an error while running the previous command. Check /home/user/.local/share/pacu/test/error_log.txt for technical details. [LOG LEVEL: MINIMAL]

    <class 'UnboundLocalError'>: cannot access local variable 'document' where it is not associated with a value

User myuser has 1 inline role:

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "Statement1",
			"Effect": "Allow",
			"Action": [
				"ssm:GetParameter"
			],
			"Resource": [
				"*"
			]
		}
	]
}

User myuser is in a group which has an inline role for this group:

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "VisualEditor0",
			"Effect": "Allow",
			"Action": "iam:ListUserPolicies",
			"Resource": "arn:aws:iam::<ACCOUNT_ID>:user/myuser"
		}
	]
}
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

1 participant