1- # ` devolv validate file `
1+ # ` devolv validate `
22
3- This is the first released module of Devolv.
3+ This is the ** first released module** of ** Devolv** — the Modular DevOps CLI Toolkit .
44
55---
66
77## 🛡 Purpose
88
9- Statically validate AWS IAM policy files for :
9+ Statically validate AWS IAM policy files to detect :
1010
11- - ✅ Wildcards in Action or Resource
12- - 🔐 ` iam:PassRole ` misuse
13- - 🚨 Common escalation risks
11+ - ✅ Wildcards in Action ( ` * ` , ` s3:* ` )
12+ - 🔐 ` iam:PassRole ` with wildcard resources
13+ - 🚨 Common privilege escalation risks
1414
1515---
1616
17- ## 📂 Supported Input
17+ ## 📂 Supported Input Formats
1818
1919- ` .json `
2020- ` .yaml ` / ` .yml `
@@ -23,14 +23,26 @@ Statically validate AWS IAM policy files for:
2323
2424## 🔧 Usage
2525
26+ ### 🔹 Validate a Single File
27+
2628``` bash
2729devolv validate file path/to/policy.json
2830```
2931
32+ ### 🔹 Validate a Folder
33+
34+ ``` bash
35+ devolv validate folder path/to/folder/
36+ ```
37+
38+ > Scans all ` .json ` , ` .yaml ` , and ` .yml ` files in the folder recursively.
39+
3040---
3141
3242## 📋 Example
3343
44+ ### Input File: ` policy.json `
45+
3446``` json
3547{
3648 "Version" : " 2012-10-17" ,
@@ -44,17 +56,19 @@ devolv validate file path/to/policy.json
4456}
4557```
4658
47- Output:
59+ ### Output
4860
4961```
5062❌ HIGH: Policy uses wildcard in Action, which is overly permissive.
63+ ❌ HIGH: iam:PassRole with wildcard resource can lead to privilege escalation.
5164```
5265
5366---
5467
5568## ✅ Exit Codes
5669
57- - ` 0 ` : All checks passed
58- - ` 1 ` : Risk found in policy
59- - ` 2 ` : File or format error
60-
70+ | Code | Meaning |
71+ | ------| -----------------------------|
72+ | ` 0 ` | All checks passed |
73+ | ` 1 ` | Risk found in policy |
74+ | ` 2 ` | File/folder not found or invalid format |
0 commit comments