owasp-guard-cli 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,150 @@
1
+ Metadata-Version: 2.4
2
+ Name: owasp-guard-cli
3
+ Version: 0.2.0
4
+ Summary: OWASP Guard CLI: prompt-engineered secure code inspector
5
+ Author: CBRS503 Team
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/jeanclaudegeage/owasp-guard
8
+ Project-URL: Issues, https://github.com/jeanclaudegeage/owasp-guard/issues
9
+ Keywords: security,owasp,sast,cli,code-scanner
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Security
16
+ Classifier: Topic :: Software Development :: Quality Assurance
17
+ Classifier: Environment :: Console
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: langchain>=0.3.0
21
+ Requires-Dist: langchain-groq>=0.2.0
22
+ Requires-Dist: pydantic>=2.7.0
23
+ Requires-Dist: python-dotenv>=1.0.1
24
+ Requires-Dist: rich>=13.7.0
25
+
26
+ # OWASP Guard CLI
27
+
28
+ OWASP Guard is a prompt-engineered secure code inspection CLI for identifying OWASP Top 10 (2021) issues in source code.
29
+
30
+ It scans a repository or single file, performs chunked LLM analysis with a verification pass, then generates:
31
+ - `report.json` for pipelines and automation
32
+ - `report.md` for human review and audit
33
+
34
+ ## Key Features
35
+ - OWASP-focused findings with confidence scoring
36
+ - Chunk-based analysis with route/function-aware heuristics
37
+ - Verification pass to reduce false positives
38
+ - Deduplication of repeated findings
39
+ - Progress-rich terminal UI
40
+ - Broad multi-language and config/IaC file support
41
+
42
+ ## Requirements
43
+ - Python `3.11+`
44
+ - Groq API key
45
+
46
+ ## Installation
47
+ From PyPI:
48
+ ```bash
49
+ pip install owasp-guard-cli
50
+ ```
51
+
52
+ From source:
53
+ ```bash
54
+ pip install -r requirements.txt
55
+ pip install -e .
56
+ ```
57
+
58
+ ## Quick Start
59
+ 1. Configure API key:
60
+ ```bash
61
+ owasp-guard init
62
+ ```
63
+
64
+ 2. Run scan:
65
+ ```bash
66
+ owasp-guard scan ./project --output-dir outputs
67
+ ```
68
+
69
+ 3. Review outputs:
70
+ - `outputs/report.json`
71
+ - `outputs/report.md`
72
+
73
+ ## CLI Usage
74
+ Main help:
75
+ ```bash
76
+ owasp-guard --help
77
+ owasp-guard help
78
+ ```
79
+
80
+ Topic help:
81
+ ```bash
82
+ owasp-guard help init
83
+ owasp-guard help scan
84
+ owasp-guard help reports
85
+ owasp-guard help errors
86
+ ```
87
+
88
+ Alias entrypoint:
89
+ ```bash
90
+ owasp help
91
+ owasp help scan
92
+ ```
93
+
94
+ ## Common Commands
95
+ Initialize with provided key:
96
+ ```bash
97
+ owasp-guard init --api-key gsk_xxx
98
+ ```
99
+
100
+ Scan repo:
101
+ ```bash
102
+ owasp-guard scan "D:\path\to\repo" --output-dir outputs
103
+ ```
104
+
105
+ Scan single file:
106
+ ```bash
107
+ owasp-guard scan "D:\path\to\file.py" --output-dir outputs
108
+ ```
109
+
110
+ Fixed-scope evaluation:
111
+ ```bash
112
+ owasp-guard scan "D:\path\to\repo" --max-files 10 --output-dir outputs
113
+ ```
114
+
115
+ Custom model:
116
+ ```bash
117
+ owasp-guard scan ./project --model llama-3.1-8b-instant
118
+ ```
119
+
120
+ ## Report Schema Summary
121
+ `report.json` includes:
122
+ - tool metadata and report version
123
+ - methodology metadata
124
+ - scope metrics (`total_files`, `total_chunks`, `total_findings`)
125
+ - summary metrics (`risk_score_10`, severity and OWASP distributions)
126
+ - full findings list
127
+
128
+ `report.md` includes:
129
+ - executive summary and risk score
130
+ - OWASP and file impact distribution
131
+ - findings index and detailed evidence/fix sections
132
+ - priority action plan and remediation roadmap
133
+
134
+ ## Exit Codes
135
+ - `0`: scan completed with no findings
136
+ - `1`: scan completed with findings
137
+ - `2`: invalid CLI usage
138
+ - `3`: runtime error
139
+
140
+ ## Error Types
141
+ - `Configuration Error`: missing/invalid API key or unreadable config
142
+ - `Input Error`: bad path, unsupported file type, invalid `--max-files`, empty scope
143
+ - `API Error`: model/provider failures
144
+ - `Report Error`: output write/serialization failures
145
+ - `Scan Error`: chunking or scan pipeline failures
146
+
147
+ ## Repository Docs
148
+ - Project prompt evolution: `PROMPT_LOG.md`
149
+ - Tool benchmark worksheet: `comparison.md`
150
+ - Sample outputs: `report.md`, `testotpt/report.md`, `juiceotpt/report.md`
@@ -0,0 +1,125 @@
1
+ # OWASP Guard CLI
2
+
3
+ OWASP Guard is a prompt-engineered secure code inspection CLI for identifying OWASP Top 10 (2021) issues in source code.
4
+
5
+ It scans a repository or single file, performs chunked LLM analysis with a verification pass, then generates:
6
+ - `report.json` for pipelines and automation
7
+ - `report.md` for human review and audit
8
+
9
+ ## Key Features
10
+ - OWASP-focused findings with confidence scoring
11
+ - Chunk-based analysis with route/function-aware heuristics
12
+ - Verification pass to reduce false positives
13
+ - Deduplication of repeated findings
14
+ - Progress-rich terminal UI
15
+ - Broad multi-language and config/IaC file support
16
+
17
+ ## Requirements
18
+ - Python `3.11+`
19
+ - Groq API key
20
+
21
+ ## Installation
22
+ From PyPI:
23
+ ```bash
24
+ pip install owasp-guard-cli
25
+ ```
26
+
27
+ From source:
28
+ ```bash
29
+ pip install -r requirements.txt
30
+ pip install -e .
31
+ ```
32
+
33
+ ## Quick Start
34
+ 1. Configure API key:
35
+ ```bash
36
+ owasp-guard init
37
+ ```
38
+
39
+ 2. Run scan:
40
+ ```bash
41
+ owasp-guard scan ./project --output-dir outputs
42
+ ```
43
+
44
+ 3. Review outputs:
45
+ - `outputs/report.json`
46
+ - `outputs/report.md`
47
+
48
+ ## CLI Usage
49
+ Main help:
50
+ ```bash
51
+ owasp-guard --help
52
+ owasp-guard help
53
+ ```
54
+
55
+ Topic help:
56
+ ```bash
57
+ owasp-guard help init
58
+ owasp-guard help scan
59
+ owasp-guard help reports
60
+ owasp-guard help errors
61
+ ```
62
+
63
+ Alias entrypoint:
64
+ ```bash
65
+ owasp help
66
+ owasp help scan
67
+ ```
68
+
69
+ ## Common Commands
70
+ Initialize with provided key:
71
+ ```bash
72
+ owasp-guard init --api-key gsk_xxx
73
+ ```
74
+
75
+ Scan repo:
76
+ ```bash
77
+ owasp-guard scan "D:\path\to\repo" --output-dir outputs
78
+ ```
79
+
80
+ Scan single file:
81
+ ```bash
82
+ owasp-guard scan "D:\path\to\file.py" --output-dir outputs
83
+ ```
84
+
85
+ Fixed-scope evaluation:
86
+ ```bash
87
+ owasp-guard scan "D:\path\to\repo" --max-files 10 --output-dir outputs
88
+ ```
89
+
90
+ Custom model:
91
+ ```bash
92
+ owasp-guard scan ./project --model llama-3.1-8b-instant
93
+ ```
94
+
95
+ ## Report Schema Summary
96
+ `report.json` includes:
97
+ - tool metadata and report version
98
+ - methodology metadata
99
+ - scope metrics (`total_files`, `total_chunks`, `total_findings`)
100
+ - summary metrics (`risk_score_10`, severity and OWASP distributions)
101
+ - full findings list
102
+
103
+ `report.md` includes:
104
+ - executive summary and risk score
105
+ - OWASP and file impact distribution
106
+ - findings index and detailed evidence/fix sections
107
+ - priority action plan and remediation roadmap
108
+
109
+ ## Exit Codes
110
+ - `0`: scan completed with no findings
111
+ - `1`: scan completed with findings
112
+ - `2`: invalid CLI usage
113
+ - `3`: runtime error
114
+
115
+ ## Error Types
116
+ - `Configuration Error`: missing/invalid API key or unreadable config
117
+ - `Input Error`: bad path, unsupported file type, invalid `--max-files`, empty scope
118
+ - `API Error`: model/provider failures
119
+ - `Report Error`: output write/serialization failures
120
+ - `Scan Error`: chunking or scan pipeline failures
121
+
122
+ ## Repository Docs
123
+ - Project prompt evolution: `PROMPT_LOG.md`
124
+ - Tool benchmark worksheet: `comparison.md`
125
+ - Sample outputs: `report.md`, `testotpt/report.md`, `juiceotpt/report.md`
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "owasp-guard-cli"
7
+ version = "0.2.0"
8
+ description = "OWASP Guard CLI: prompt-engineered secure code inspector"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ authors = [
13
+ { name = "CBRS503 Team" }
14
+ ]
15
+ dependencies = [
16
+ "langchain>=0.3.0",
17
+ "langchain-groq>=0.2.0",
18
+ "pydantic>=2.7.0",
19
+ "python-dotenv>=1.0.1",
20
+ "rich>=13.7.0",
21
+ ]
22
+ classifiers = [
23
+ "Development Status :: 3 - Alpha",
24
+ "Intended Audience :: Developers",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Topic :: Security",
29
+ "Topic :: Software Development :: Quality Assurance",
30
+ "Environment :: Console",
31
+ ]
32
+ keywords = ["security", "owasp", "sast", "cli", "code-scanner"]
33
+
34
+ [project.scripts]
35
+ owasp-guard = "owasp_guard.cli:main"
36
+ owasp = "owasp_guard.cli:main"
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/jeanclaudegeage/owasp-guard"
40
+ Issues = "https://github.com/jeanclaudegeage/owasp-guard/issues"
41
+
42
+ [tool.setuptools]
43
+ package-dir = {"" = "src"}
44
+
45
+ [tool.setuptools.packages.find]
46
+ where = ["src"]
47
+ include = ["owasp_guard", "owasp_guard.*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ from setuptools import setup
2
+
3
+ setup()
@@ -0,0 +1,3 @@
1
+ __all__ = ['__version__']
2
+ __version__ = '0.2.0'
3
+
@@ -0,0 +1,5 @@
1
+ from .cli import main
2
+
3
+ if __name__ == '__main__':
4
+ main()
5
+