pace-agents 0.1.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.
- pace_agents-0.1.0/.gitignore +23 -0
- pace_agents-0.1.0/LICENSE +21 -0
- pace_agents-0.1.0/PKG-INFO +266 -0
- pace_agents-0.1.0/README.md +233 -0
- pace_agents-0.1.0/pyproject.toml +99 -0
- pace_agents-0.1.0/src/pace/__init__.py +1 -0
- pace_agents-0.1.0/src/pace/audit/__init__.py +373 -0
- pace_agents-0.1.0/src/pace/audit_state.py +109 -0
- pace_agents-0.1.0/src/pace/auth.py +257 -0
- pace_agents-0.1.0/src/pace/cli/__init__.py +0 -0
- pace_agents-0.1.0/src/pace/cli/main.py +989 -0
- pace_agents-0.1.0/src/pace/cli/rich_utils.py +18 -0
- pace_agents-0.1.0/src/pace/codeindex.py +269 -0
- pace_agents-0.1.0/src/pace/config.py +40 -0
- pace_agents-0.1.0/src/pace/diff.py +33 -0
- pace_agents-0.1.0/src/pace/exceptions.py +10 -0
- pace_agents-0.1.0/src/pace/exit_codes.py +55 -0
- pace_agents-0.1.0/src/pace/finding_id.py +74 -0
- pace_agents-0.1.0/src/pace/fix/__init__.py +0 -0
- pace_agents-0.1.0/src/pace/fix/author.py +112 -0
- pace_agents-0.1.0/src/pace/fix/coder.py +169 -0
- pace_agents-0.1.0/src/pace/fix/evaluator.py +213 -0
- pace_agents-0.1.0/src/pace/fix/planner.py +64 -0
- pace_agents-0.1.0/src/pace/index.py +278 -0
- pace_agents-0.1.0/src/pace/llm.py +56 -0
- pace_agents-0.1.0/src/pace/profiles.py +81 -0
- pace_agents-0.1.0/src/pace/report.py +324 -0
- pace_agents-0.1.0/src/pace/rules/__init__.py +151 -0
- pace_agents-0.1.0/src/pace/rulesets.py +395 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.env
|
|
2
|
+
.env.local
|
|
3
|
+
.env.*.local
|
|
4
|
+
node_modules/
|
|
5
|
+
.next/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.log
|
|
9
|
+
.DS_Store
|
|
10
|
+
|
|
11
|
+
# Python
|
|
12
|
+
.venv/
|
|
13
|
+
__pycache__/
|
|
14
|
+
*.pyc
|
|
15
|
+
.pytest_cache/
|
|
16
|
+
.mypy_cache/
|
|
17
|
+
.ruff_cache/
|
|
18
|
+
*.egg-info/
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
21
|
+
|
|
22
|
+
# PACE runtime artifacts
|
|
23
|
+
.pace/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PACE
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pace-agents
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Compliance audit CLI: AST pattern matching + LLM agent loop + autonomous fix generation + audit-ready evidence
|
|
5
|
+
Project-URL: Homepage, https://pace.watch
|
|
6
|
+
Project-URL: Repository, https://github.com/01x-in/pace-agents
|
|
7
|
+
Project-URL: Issues, https://github.com/01x-in/pace-agents/issues
|
|
8
|
+
Author: PACE
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: audit,cli,compliance,hipaa,pci-dss,security,soc2
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Security
|
|
20
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: cryptography>=42.0.0
|
|
23
|
+
Requires-Dist: httpx>=0.27.0
|
|
24
|
+
Requires-Dist: openai>=1.30.0
|
|
25
|
+
Requires-Dist: pydantic>=2.7.0
|
|
26
|
+
Requires-Dist: pyyaml>=6.0.1
|
|
27
|
+
Requires-Dist: rich>=13.7.0
|
|
28
|
+
Requires-Dist: tomli-w>=1.0.0
|
|
29
|
+
Requires-Dist: tree-sitter-python>=0.21.0
|
|
30
|
+
Requires-Dist: tree-sitter>=0.22.0
|
|
31
|
+
Requires-Dist: typer>=0.12.0
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# PACE
|
|
35
|
+
|
|
36
|
+
> Find every compliance violation in your codebase, auto-fix them with verified patches, and generate the audit-ready evidence trail that proves it — without hiring a security consultant.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
PACE ships as the `pace-agents` Python package and exposes the `pace` CLI.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Recommended for local CLI use
|
|
46
|
+
pipx install pace-agents
|
|
47
|
+
|
|
48
|
+
# Standard Python install
|
|
49
|
+
pip install pace-agents
|
|
50
|
+
|
|
51
|
+
# Homebrew tap
|
|
52
|
+
brew install 01x-in/tap/pace-agents
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
After installing, run:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pace --help
|
|
59
|
+
pace init --profile hipaa
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## What is PACE?
|
|
65
|
+
|
|
66
|
+
PACE is a CLI tool for engineering teams that need to demonstrate code-level compliance — HIPAA, SOC2, PCI-DSS — without a dedicated security team. It combines a two-pass audit loop with a four-agent fix loop to go from raw codebase to timestamped evidence artifact in a single workflow.
|
|
67
|
+
|
|
68
|
+
**Snyk finds. PACE finds, fixes, and proves.**
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## How it works
|
|
73
|
+
|
|
74
|
+
### Step 1 — Initialize
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pace init --profile hipaa
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Select your compliance framework (`hipaa`, `soc2`, `pci-dss`, or `all`) and configure your LLM endpoint in `pace.toml`. Pass 1 scanning works entirely offline with no LLM calls — pure AST pattern matching, always free.
|
|
81
|
+
|
|
82
|
+
### Step 2 — Scan
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pace scan
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Runs a two-pass audit of your codebase:
|
|
89
|
+
|
|
90
|
+
- **Pass 1** — tree-sitter AST pattern matching against the YAML rule library. Deterministic, no LLM, zero cost. Runs in CI too.
|
|
91
|
+
- **Pass 2** — an autoresearch-style agent loop that walks every function in the code index, reviewing each one for compliance violations with an accumulated audit journal. Review 47 knows what reviews 1–46 found — this is how PACE catches violations that span multiple files.
|
|
92
|
+
|
|
93
|
+
### Step 3 — Fix
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pace fix
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Runs the four PACE agents on open findings (see below).
|
|
100
|
+
|
|
101
|
+
### Step 4 — Report
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pace report
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Generates three timestamped evidence artifacts in `.pace/`:
|
|
108
|
+
|
|
109
|
+
| File | Use |
|
|
110
|
+
|---|---|
|
|
111
|
+
| `report-<ts>.md` | Markdown — for developers and version control |
|
|
112
|
+
| `report-<ts>.json` | JSON — for CI pipelines and tooling |
|
|
113
|
+
| `report-<ts>.html` | HTML — self-contained, auditor-readable, open in any browser |
|
|
114
|
+
|
|
115
|
+
Each finding is mapped to its specific compliance control (e.g., HIPAA §164.312(a)(1), PCI-DSS Req 3.4, SOC2 CC6.1). The HTML report includes color-coded severity and status badges, syntax-highlighted before/after diffs, and Evaluator verdict for every fixed finding.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## The Four PACE Agents
|
|
120
|
+
|
|
121
|
+
PACE is an acronym. The fix loop runs four specialist agents sequentially — the output of each becomes the input of the next. Each agent has a single, focused job, and can be retried independently on failure.
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Planner → [for each finding group]:
|
|
125
|
+
Author → Coder → Evaluator
|
|
126
|
+
↑_______________| (on reject, up to N retries)
|
|
127
|
+
|
|
128
|
+
After retry cap: finding → needs-human-review
|
|
129
|
+
After accept: finding → fixed, patch staged, evidence recorded
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### P — Planner
|
|
133
|
+
|
|
134
|
+
Receives the complete audit journal and the full list of open findings. Ranks violations by severity and compliance framework weight, then clusters related findings that share a root cause or fix strategy (e.g., multiple PHI-in-logs violations stemming from the same logging utility).
|
|
135
|
+
|
|
136
|
+
- **Input:** Audit journal + open findings list
|
|
137
|
+
- **Output:** Ordered fix plan with severity rankings and fix strategy hints
|
|
138
|
+
- **Does NOT:** Write code, apply patches, or validate anything
|
|
139
|
+
|
|
140
|
+
### A — Author
|
|
141
|
+
|
|
142
|
+
Receives a single finding group from the Planner, the relevant functions from the code index, and any fix strategy hint. Proposes a concrete code patch — not a general suggestion, but a specific diff. On retry, receives the Evaluator's failure context and must revise its proposal.
|
|
143
|
+
|
|
144
|
+
- **Input:** Finding group + relevant code + fix strategy hint (+ failure context on retry)
|
|
145
|
+
- **Output:** Proposed code patch (diff)
|
|
146
|
+
- **Does NOT:** Apply the patch or run tests
|
|
147
|
+
|
|
148
|
+
### C — Coder
|
|
149
|
+
|
|
150
|
+
Receives the Author's proposed patch and applies it to a feature branch, then runs the project's existing test suite against the patched branch. Purely mechanical — applies the patch, runs the tests, reports results.
|
|
151
|
+
|
|
152
|
+
- **Input:** Proposed patch + branch ref
|
|
153
|
+
- **Output:** Patch application status + test suite results (pass/fail counts, failure output)
|
|
154
|
+
- **Does NOT:** Judge correctness, re-scan for compliance, or interpret test failures
|
|
155
|
+
|
|
156
|
+
### E — Evaluator
|
|
157
|
+
|
|
158
|
+
The acceptance gate. Re-runs the compliance scan on the patched branch, checking that (1) tests pass, (2) the original finding is gone, and (3) no new violations were introduced. A fix is accepted only if all three conditions hold. On rejection, returns structured failure context to the Author for retry. After the retry cap (default: 3), the finding is flagged `needs-human-review` and the loop moves on.
|
|
159
|
+
|
|
160
|
+
- **Input:** Test results + patched branch
|
|
161
|
+
- **Output:** Accept or reject decision + structured failure context (on reject)
|
|
162
|
+
- **Does NOT:** Write code or propose alternatives — only accepts or rejects
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## What PACE scans for
|
|
167
|
+
|
|
168
|
+
Three categories across all compliance profiles:
|
|
169
|
+
|
|
170
|
+
| Category | Examples |
|
|
171
|
+
|---|---|
|
|
172
|
+
| Sensitive data flow | PII/PHI/cardholder data in logs, error handlers, API responses, debug outputs |
|
|
173
|
+
| Supply chain integrity | Post-install hooks, obfuscated payloads, base64 execution in transitive dependencies |
|
|
174
|
+
| Secrets & credential hygiene | Hardcoded keys, unrotated tokens, permissive configs |
|
|
175
|
+
|
|
176
|
+
The compliance profile is a config layer that determines which rules are prioritized and which framework controls appear in the evidence output — same detection engine, different audit language.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Rulesets
|
|
181
|
+
|
|
182
|
+
Rule packs are distributed separately from the PACE engine — install only what your audit requires.
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# See what's installed and what's available
|
|
186
|
+
pace rules ls
|
|
187
|
+
|
|
188
|
+
# Install a pack
|
|
189
|
+
pace rules install hipaa
|
|
190
|
+
pace rules install hipaa --global # install to ~/.pace/rulesets/ (shared across projects)
|
|
191
|
+
|
|
192
|
+
# Keep packs up to date
|
|
193
|
+
pace rules update
|
|
194
|
+
pace rules update hipaa
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
`pace rules ls` shows installed packs alongside all available packs from pace.watch:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
Installed packs
|
|
201
|
+
────────────────────────────────────────────────────────────────────────────────
|
|
202
|
+
PROFILE TIER VERSION SCOPE PATH
|
|
203
|
+
hipaa community 1.2.0 global ~/.pace/rulesets/hipaa/...
|
|
204
|
+
|
|
205
|
+
Available packs
|
|
206
|
+
────────────────────────────────────────────────────────────────────────────────
|
|
207
|
+
PROFILE DESCRIPTION
|
|
208
|
+
soc2 SOC 2 Type II — availability, confidentiality, change management
|
|
209
|
+
pci-dss PCI DSS v4.0 — cardholder data, transmission security, authentication
|
|
210
|
+
gdpr GDPR — personal data exposure, consent signals, data minimisation
|
|
211
|
+
nist NIST CSF — identify, protect, detect, respond, recover controls
|
|
212
|
+
iso27001 ISO 27001 — information security management system controls
|
|
213
|
+
|
|
214
|
+
Visit pace.watch/rules for expert-reviewed rulesets — HIPAA, SOC2, GDPR and more.
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Each rule is tagged with a universal category (`encryption`, `secrets-credentials`, `audit-logging`, etc.) that works across frameworks — so a `--category encryption` filter surfaces all encryption gaps regardless of whether the finding came from HIPAA, PCI-DSS, or NIST rules.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## CI integration
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
pace scan --diff HEAD~1 --pass1-only
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Scans only changed files using Pass 1 (AST pattern matching only — no LLM calls) and exits non-zero on new violations. Drop it in your PR checks to block merges that introduce compliance regressions.
|
|
228
|
+
|
|
229
|
+
> Without `--pass1-only`, `pace scan` also runs Pass 2 (the LLM audit loop) and requires a configured LLM endpoint.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Key design decisions
|
|
234
|
+
|
|
235
|
+
- **Zero vendor lock-in** — bring your own LLM endpoint via `pace.toml` (OpenRouter, Ollama, vLLM, any OpenAI-compatible provider). PACE never hardcodes a provider.
|
|
236
|
+
- **Privacy controlled by you** — your code never leaves your machine unless you point PACE at a remote endpoint. Use Ollama (`http://localhost:11434/v1`) for fully local LLM inference, vLLM on your own GPU, or any OpenAI-compatible provider. Pass 1 (AST scanning) is always local and always free — no LLM required.
|
|
237
|
+
- **BYOE (Bring Your Own Endpoint)** — no provider is hardcoded. Configure any OpenAI-compatible endpoint in `pace.toml`: Ollama, vLLM, OpenRouter, Azure OpenAI. Air-gapped healthcare environments can run Pass 1 fully offline and Pass 2 with a local Ollama instance.
|
|
238
|
+
- **Content-hash finding IDs** — findings survive code refactoring without false regressions.
|
|
239
|
+
- **Bounded context** — the audit loop uses compressed journal summaries, not full review transcripts. Works on codebases of any size.
|
|
240
|
+
- **Delta audits** — `.pace/audit-state.json` persists finding status across runs; only new or regressed findings re-enter the loops.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Tech stack
|
|
245
|
+
|
|
246
|
+
- Python CLI via [typer](https://typer.tiangolo.com/)
|
|
247
|
+
- Code indexing: [codeindex](https://github.com/01x-in/codeindex) (Go binary, tree-sitter → SQLite) — installed separately
|
|
248
|
+
- LLM integration: single OpenAI-compatible client
|
|
249
|
+
- Rule library: YAML rule packs distributed via pace.watch — install with `pace rules install <profile>` (not bundled in the pip package)
|
|
250
|
+
- Audit state: `.pace/audit-state.json` committed to repo
|
|
251
|
+
- Evidence output: structured markdown for developers, JSON for CI pipelines
|
|
252
|
+
- Install: `pipx install pace-agents` — then `pace rules install hipaa` to pull the rule pack
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Compared to alternatives
|
|
257
|
+
|
|
258
|
+
| Tool | Finds violations | Auto-fixes | Compliance-mapped evidence |
|
|
259
|
+
|---|---|---|---|
|
|
260
|
+
| Vanta / Drata | infra & policy only | — | — |
|
|
261
|
+
| Snyk / Semgrep | yes | no | no |
|
|
262
|
+
| **PACE** | **yes** | **yes** | **yes** |
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
*Built by [01x](https://01x.in)*
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# PACE
|
|
2
|
+
|
|
3
|
+
> Find every compliance violation in your codebase, auto-fix them with verified patches, and generate the audit-ready evidence trail that proves it — without hiring a security consultant.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
PACE ships as the `pace-agents` Python package and exposes the `pace` CLI.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Recommended for local CLI use
|
|
13
|
+
pipx install pace-agents
|
|
14
|
+
|
|
15
|
+
# Standard Python install
|
|
16
|
+
pip install pace-agents
|
|
17
|
+
|
|
18
|
+
# Homebrew tap
|
|
19
|
+
brew install 01x-in/tap/pace-agents
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
After installing, run:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pace --help
|
|
26
|
+
pace init --profile hipaa
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## What is PACE?
|
|
32
|
+
|
|
33
|
+
PACE is a CLI tool for engineering teams that need to demonstrate code-level compliance — HIPAA, SOC2, PCI-DSS — without a dedicated security team. It combines a two-pass audit loop with a four-agent fix loop to go from raw codebase to timestamped evidence artifact in a single workflow.
|
|
34
|
+
|
|
35
|
+
**Snyk finds. PACE finds, fixes, and proves.**
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## How it works
|
|
40
|
+
|
|
41
|
+
### Step 1 — Initialize
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pace init --profile hipaa
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Select your compliance framework (`hipaa`, `soc2`, `pci-dss`, or `all`) and configure your LLM endpoint in `pace.toml`. Pass 1 scanning works entirely offline with no LLM calls — pure AST pattern matching, always free.
|
|
48
|
+
|
|
49
|
+
### Step 2 — Scan
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pace scan
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Runs a two-pass audit of your codebase:
|
|
56
|
+
|
|
57
|
+
- **Pass 1** — tree-sitter AST pattern matching against the YAML rule library. Deterministic, no LLM, zero cost. Runs in CI too.
|
|
58
|
+
- **Pass 2** — an autoresearch-style agent loop that walks every function in the code index, reviewing each one for compliance violations with an accumulated audit journal. Review 47 knows what reviews 1–46 found — this is how PACE catches violations that span multiple files.
|
|
59
|
+
|
|
60
|
+
### Step 3 — Fix
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pace fix
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Runs the four PACE agents on open findings (see below).
|
|
67
|
+
|
|
68
|
+
### Step 4 — Report
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pace report
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Generates three timestamped evidence artifacts in `.pace/`:
|
|
75
|
+
|
|
76
|
+
| File | Use |
|
|
77
|
+
|---|---|
|
|
78
|
+
| `report-<ts>.md` | Markdown — for developers and version control |
|
|
79
|
+
| `report-<ts>.json` | JSON — for CI pipelines and tooling |
|
|
80
|
+
| `report-<ts>.html` | HTML — self-contained, auditor-readable, open in any browser |
|
|
81
|
+
|
|
82
|
+
Each finding is mapped to its specific compliance control (e.g., HIPAA §164.312(a)(1), PCI-DSS Req 3.4, SOC2 CC6.1). The HTML report includes color-coded severity and status badges, syntax-highlighted before/after diffs, and Evaluator verdict for every fixed finding.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## The Four PACE Agents
|
|
87
|
+
|
|
88
|
+
PACE is an acronym. The fix loop runs four specialist agents sequentially — the output of each becomes the input of the next. Each agent has a single, focused job, and can be retried independently on failure.
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Planner → [for each finding group]:
|
|
92
|
+
Author → Coder → Evaluator
|
|
93
|
+
↑_______________| (on reject, up to N retries)
|
|
94
|
+
|
|
95
|
+
After retry cap: finding → needs-human-review
|
|
96
|
+
After accept: finding → fixed, patch staged, evidence recorded
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### P — Planner
|
|
100
|
+
|
|
101
|
+
Receives the complete audit journal and the full list of open findings. Ranks violations by severity and compliance framework weight, then clusters related findings that share a root cause or fix strategy (e.g., multiple PHI-in-logs violations stemming from the same logging utility).
|
|
102
|
+
|
|
103
|
+
- **Input:** Audit journal + open findings list
|
|
104
|
+
- **Output:** Ordered fix plan with severity rankings and fix strategy hints
|
|
105
|
+
- **Does NOT:** Write code, apply patches, or validate anything
|
|
106
|
+
|
|
107
|
+
### A — Author
|
|
108
|
+
|
|
109
|
+
Receives a single finding group from the Planner, the relevant functions from the code index, and any fix strategy hint. Proposes a concrete code patch — not a general suggestion, but a specific diff. On retry, receives the Evaluator's failure context and must revise its proposal.
|
|
110
|
+
|
|
111
|
+
- **Input:** Finding group + relevant code + fix strategy hint (+ failure context on retry)
|
|
112
|
+
- **Output:** Proposed code patch (diff)
|
|
113
|
+
- **Does NOT:** Apply the patch or run tests
|
|
114
|
+
|
|
115
|
+
### C — Coder
|
|
116
|
+
|
|
117
|
+
Receives the Author's proposed patch and applies it to a feature branch, then runs the project's existing test suite against the patched branch. Purely mechanical — applies the patch, runs the tests, reports results.
|
|
118
|
+
|
|
119
|
+
- **Input:** Proposed patch + branch ref
|
|
120
|
+
- **Output:** Patch application status + test suite results (pass/fail counts, failure output)
|
|
121
|
+
- **Does NOT:** Judge correctness, re-scan for compliance, or interpret test failures
|
|
122
|
+
|
|
123
|
+
### E — Evaluator
|
|
124
|
+
|
|
125
|
+
The acceptance gate. Re-runs the compliance scan on the patched branch, checking that (1) tests pass, (2) the original finding is gone, and (3) no new violations were introduced. A fix is accepted only if all three conditions hold. On rejection, returns structured failure context to the Author for retry. After the retry cap (default: 3), the finding is flagged `needs-human-review` and the loop moves on.
|
|
126
|
+
|
|
127
|
+
- **Input:** Test results + patched branch
|
|
128
|
+
- **Output:** Accept or reject decision + structured failure context (on reject)
|
|
129
|
+
- **Does NOT:** Write code or propose alternatives — only accepts or rejects
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## What PACE scans for
|
|
134
|
+
|
|
135
|
+
Three categories across all compliance profiles:
|
|
136
|
+
|
|
137
|
+
| Category | Examples |
|
|
138
|
+
|---|---|
|
|
139
|
+
| Sensitive data flow | PII/PHI/cardholder data in logs, error handlers, API responses, debug outputs |
|
|
140
|
+
| Supply chain integrity | Post-install hooks, obfuscated payloads, base64 execution in transitive dependencies |
|
|
141
|
+
| Secrets & credential hygiene | Hardcoded keys, unrotated tokens, permissive configs |
|
|
142
|
+
|
|
143
|
+
The compliance profile is a config layer that determines which rules are prioritized and which framework controls appear in the evidence output — same detection engine, different audit language.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Rulesets
|
|
148
|
+
|
|
149
|
+
Rule packs are distributed separately from the PACE engine — install only what your audit requires.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# See what's installed and what's available
|
|
153
|
+
pace rules ls
|
|
154
|
+
|
|
155
|
+
# Install a pack
|
|
156
|
+
pace rules install hipaa
|
|
157
|
+
pace rules install hipaa --global # install to ~/.pace/rulesets/ (shared across projects)
|
|
158
|
+
|
|
159
|
+
# Keep packs up to date
|
|
160
|
+
pace rules update
|
|
161
|
+
pace rules update hipaa
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
`pace rules ls` shows installed packs alongside all available packs from pace.watch:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
Installed packs
|
|
168
|
+
────────────────────────────────────────────────────────────────────────────────
|
|
169
|
+
PROFILE TIER VERSION SCOPE PATH
|
|
170
|
+
hipaa community 1.2.0 global ~/.pace/rulesets/hipaa/...
|
|
171
|
+
|
|
172
|
+
Available packs
|
|
173
|
+
────────────────────────────────────────────────────────────────────────────────
|
|
174
|
+
PROFILE DESCRIPTION
|
|
175
|
+
soc2 SOC 2 Type II — availability, confidentiality, change management
|
|
176
|
+
pci-dss PCI DSS v4.0 — cardholder data, transmission security, authentication
|
|
177
|
+
gdpr GDPR — personal data exposure, consent signals, data minimisation
|
|
178
|
+
nist NIST CSF — identify, protect, detect, respond, recover controls
|
|
179
|
+
iso27001 ISO 27001 — information security management system controls
|
|
180
|
+
|
|
181
|
+
Visit pace.watch/rules for expert-reviewed rulesets — HIPAA, SOC2, GDPR and more.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Each rule is tagged with a universal category (`encryption`, `secrets-credentials`, `audit-logging`, etc.) that works across frameworks — so a `--category encryption` filter surfaces all encryption gaps regardless of whether the finding came from HIPAA, PCI-DSS, or NIST rules.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## CI integration
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
pace scan --diff HEAD~1 --pass1-only
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Scans only changed files using Pass 1 (AST pattern matching only — no LLM calls) and exits non-zero on new violations. Drop it in your PR checks to block merges that introduce compliance regressions.
|
|
195
|
+
|
|
196
|
+
> Without `--pass1-only`, `pace scan` also runs Pass 2 (the LLM audit loop) and requires a configured LLM endpoint.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Key design decisions
|
|
201
|
+
|
|
202
|
+
- **Zero vendor lock-in** — bring your own LLM endpoint via `pace.toml` (OpenRouter, Ollama, vLLM, any OpenAI-compatible provider). PACE never hardcodes a provider.
|
|
203
|
+
- **Privacy controlled by you** — your code never leaves your machine unless you point PACE at a remote endpoint. Use Ollama (`http://localhost:11434/v1`) for fully local LLM inference, vLLM on your own GPU, or any OpenAI-compatible provider. Pass 1 (AST scanning) is always local and always free — no LLM required.
|
|
204
|
+
- **BYOE (Bring Your Own Endpoint)** — no provider is hardcoded. Configure any OpenAI-compatible endpoint in `pace.toml`: Ollama, vLLM, OpenRouter, Azure OpenAI. Air-gapped healthcare environments can run Pass 1 fully offline and Pass 2 with a local Ollama instance.
|
|
205
|
+
- **Content-hash finding IDs** — findings survive code refactoring without false regressions.
|
|
206
|
+
- **Bounded context** — the audit loop uses compressed journal summaries, not full review transcripts. Works on codebases of any size.
|
|
207
|
+
- **Delta audits** — `.pace/audit-state.json` persists finding status across runs; only new or regressed findings re-enter the loops.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Tech stack
|
|
212
|
+
|
|
213
|
+
- Python CLI via [typer](https://typer.tiangolo.com/)
|
|
214
|
+
- Code indexing: [codeindex](https://github.com/01x-in/codeindex) (Go binary, tree-sitter → SQLite) — installed separately
|
|
215
|
+
- LLM integration: single OpenAI-compatible client
|
|
216
|
+
- Rule library: YAML rule packs distributed via pace.watch — install with `pace rules install <profile>` (not bundled in the pip package)
|
|
217
|
+
- Audit state: `.pace/audit-state.json` committed to repo
|
|
218
|
+
- Evidence output: structured markdown for developers, JSON for CI pipelines
|
|
219
|
+
- Install: `pipx install pace-agents` — then `pace rules install hipaa` to pull the rule pack
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Compared to alternatives
|
|
224
|
+
|
|
225
|
+
| Tool | Finds violations | Auto-fixes | Compliance-mapped evidence |
|
|
226
|
+
|---|---|---|---|
|
|
227
|
+
| Vanta / Drata | infra & policy only | — | — |
|
|
228
|
+
| Snyk / Semgrep | yes | no | no |
|
|
229
|
+
| **PACE** | **yes** | **yes** | **yes** |
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
*Built by [01x](https://01x.in)*
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pace-agents"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Compliance audit CLI: AST pattern matching + LLM agent loop + autonomous fix generation + audit-ready evidence"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
authors = [{ name = "PACE" }]
|
|
8
|
+
license = { text = "MIT" }
|
|
9
|
+
keywords = ["compliance", "audit", "hipaa", "soc2", "pci-dss", "security", "cli"]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 3 - Alpha",
|
|
12
|
+
"Environment :: Console",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.11",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"Topic :: Security",
|
|
19
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"typer>=0.12.0",
|
|
23
|
+
"rich>=13.7.0",
|
|
24
|
+
"pydantic>=2.7.0",
|
|
25
|
+
"pyyaml>=6.0.1",
|
|
26
|
+
"openai>=1.30.0",
|
|
27
|
+
"tree-sitter>=0.22.0",
|
|
28
|
+
"tree-sitter-python>=0.21.0",
|
|
29
|
+
"httpx>=0.27.0",
|
|
30
|
+
"tomli-w>=1.0.0",
|
|
31
|
+
"cryptography>=42.0.0",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
Homepage = "https://pace.watch"
|
|
36
|
+
Repository = "https://github.com/01x-in/pace-agents"
|
|
37
|
+
Issues = "https://github.com/01x-in/pace-agents/issues"
|
|
38
|
+
|
|
39
|
+
[project.scripts]
|
|
40
|
+
pace = "pace.cli.main:app"
|
|
41
|
+
|
|
42
|
+
[build-system]
|
|
43
|
+
requires = ["hatchling"]
|
|
44
|
+
build-backend = "hatchling.build"
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.wheel]
|
|
47
|
+
packages = ["src/pace"]
|
|
48
|
+
# Rule packs are NOT bundled in the pip package — they are downloaded separately
|
|
49
|
+
# via `pace rules install <profile>` and stored in ~/.pace/rulesets/ or .pace/rulesets/.
|
|
50
|
+
# Keep this rooted so the runtime package `src/pace/rules` is still included.
|
|
51
|
+
exclude = ["/rules"]
|
|
52
|
+
|
|
53
|
+
[tool.hatch.build.targets.sdist]
|
|
54
|
+
include = [
|
|
55
|
+
"/LICENSE",
|
|
56
|
+
"/README.md",
|
|
57
|
+
"/pyproject.toml",
|
|
58
|
+
"/src",
|
|
59
|
+
]
|
|
60
|
+
exclude = [
|
|
61
|
+
"/.claude",
|
|
62
|
+
"/.github",
|
|
63
|
+
"/agent_docs",
|
|
64
|
+
"/npm",
|
|
65
|
+
"/rules",
|
|
66
|
+
"/site",
|
|
67
|
+
"/tests",
|
|
68
|
+
"/AGENTS.md",
|
|
69
|
+
"/CLAUDE.md",
|
|
70
|
+
"/TESTING.md",
|
|
71
|
+
"/uv.lock",
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
[dependency-groups]
|
|
75
|
+
dev = [
|
|
76
|
+
"pytest>=8.2.0",
|
|
77
|
+
"pytest-cov>=5.0.0",
|
|
78
|
+
"ruff>=0.5.0",
|
|
79
|
+
"mypy>=1.10.0",
|
|
80
|
+
"types-PyYAML>=6.0.0",
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[tool.ruff]
|
|
84
|
+
line-length = 100
|
|
85
|
+
target-version = "py311"
|
|
86
|
+
src = ["src", "tests"]
|
|
87
|
+
|
|
88
|
+
[tool.ruff.lint]
|
|
89
|
+
select = ["E", "F", "I", "B", "UP", "N", "SIM"]
|
|
90
|
+
|
|
91
|
+
[tool.mypy]
|
|
92
|
+
strict = true
|
|
93
|
+
python_version = "3.11"
|
|
94
|
+
mypy_path = "src"
|
|
95
|
+
packages = ["pace"]
|
|
96
|
+
|
|
97
|
+
[tool.pytest.ini_options]
|
|
98
|
+
testpaths = ["tests"]
|
|
99
|
+
pythonpath = ["src"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|