https://github.com/eugercek/polic
Expand folded policies to achieve the least privilege
https://github.com/eugercek/polic
aws aws-iam aws-iam-policies go iam
Last synced: 6 months ago
JSON representation
Expand folded policies to achieve the least privilege
- Host: GitHub
- URL: https://github.com/eugercek/polic
- Owner: eugercek
- License: mit
- Created: 2022-07-28T11:04:29.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-29T17:44:57.000Z (over 3 years ago)
- Last Synced: 2024-06-21T15:43:15.659Z (about 2 years ago)
- Topics: aws, aws-iam, aws-iam-policies, go, iam
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Simple CLI for expanding your IAM policies' actions.
Expand cryptic policies to achieve least privilege
# Usage
## Expand policy file and save as
```sh
$ ./polic --file=foo.json --out=out.json # Also can --sort
```
## Expand policy file and change the file
```sh
$ ./polic --file=foo.json --inline --sort
```
## Expand single action
```sh
$ ./polic -single waf:Get*
waf:GetByteMatchSet
waf:GetChangeToken
waf:GetChangeTokenStatus
waf:GetGeoMatchSet
waf:GetIPSet
waf:GetLoggingConfiguration
waf:GetPermissionPolicy
waf:GetRateBasedRule
waf:GetRateBasedRuleManagedKeys
waf:GetRegexMatchSet
waf:GetRegexPatternSet
waf:GetRule
waf:GetRuleGroup
waf:GetSampledRequests
waf:GetSizeConstraintSet
waf:GetSqlInjectionMatchSet
waf:GetWebACL
waf:GetXssMatchSet
```
## Expand in a repl
```sh
$ ./polic
Enter an AWS action: (enter-something)
.... # results
Enter an AWS action: (enter-something)
.... # results
Enter an AWS action: exit # Or
```
# TODO