@praneeth_54/agentdoctor 0.1.2-beta → 0.1.4-beta
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.
- package/CHANGELOG.md +46 -2
- package/README.md +213 -196
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/core/rules/security/env-file-exposure.d.ts +6 -0
- package/dist/core/rules/security/env-file-exposure.js +78 -9
- package/dist/core/rules/security/private-key-file.js +5 -3
- package/dist/core/scanner/scan.js +6 -0
- package/dist/detectors/framework.d.ts +3 -0
- package/dist/detectors/framework.js +19 -9
- package/dist/detectors/language.d.ts +1 -0
- package/dist/detectors/language.js +7 -0
- package/dist/detectors/package-manager.d.ts +5 -0
- package/dist/detectors/package-manager.js +39 -1
- package/dist/detectors/project.js +68 -18
- package/dist/detectors/python-deps.d.ts +6 -0
- package/dist/detectors/python-deps.js +55 -0
- package/dist/index.d.ts +1 -1
- package/dist/reporters/json/report.js +1 -0
- package/dist/reporters/terminal/report.js +36 -10
- package/dist/types/index.d.ts +10 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,7 +11,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
- Deterministic readiness scoring
|
|
13
13
|
- Safe automatic fixes
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
## [0.1.4-beta] — 2026-08-02
|
|
16
|
+
|
|
17
|
+
Backward-compatible distribution release: first-class GitHub Action packaging. CLI and scanner behavior are unchanged from 0.1.3-beta.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Composite GitHub Action (`action.yml`) that installs the published `@praneeth_54/agentdoctor` package and emits a workspace-contained JSON report
|
|
22
|
+
- CI `action-smoke` matrix covering normal/nested output paths and rejection of traversal, parent-symlink escape, final-file symlink, and directory output targets
|
|
23
|
+
- README GitHub Action usage section and ROADMAP update for CI packaging
|
|
24
|
+
|
|
25
|
+
### Compatibility
|
|
26
|
+
|
|
27
|
+
- No scanner, rule, or JSON finding-schema changes
|
|
28
|
+
- Scoring remains unavailable (`scoringAvailable: false`)
|
|
29
|
+
- `--min-score` remains accepted but ignored until scoring ships
|
|
30
|
+
- Default Action `version` input is `0.1.4-beta` (exact npm version or `latest` / `beta` dist-tags)
|
|
31
|
+
|
|
32
|
+
## [0.1.3-beta] — 2026-07-29
|
|
33
|
+
|
|
34
|
+
Backward-compatible security-signal and detection-quality patch.
|
|
35
|
+
|
|
36
|
+
### Security
|
|
37
|
+
|
|
38
|
+
- Repositories without supported agent configuration no longer receive an unqualified clean result when relevant repository-risk findings exist
|
|
39
|
+
- Agent exposure and repository risk remain semantically distinct (`affectedAgents` is empty when exposure is not asserted)
|
|
40
|
+
- Additive `agentSecurityAnalysis` field: `full` | `limited`
|
|
41
|
+
- Environment templates (`.env.example`, `.env.sample`, `.env.template`, `.env.dist`) receive informational treatment
|
|
42
|
+
- Common environment backup filenames (`.env_backup`, `.env_old`, `.env_local`) receive conservative warning treatment
|
|
43
|
+
|
|
44
|
+
### Detection
|
|
45
|
+
|
|
46
|
+
- Prevent false Django detection from arbitrary nested `settings.py` files
|
|
47
|
+
- Detect nested FastAPI projects using dependency + `app/main.py` structure evidence
|
|
48
|
+
- Detect React from nested project manifests
|
|
49
|
+
- Prevent Poetry detection from generic non-Poetry `pyproject.toml` files (for example hatchling)
|
|
50
|
+
- Improve multi-stack terminal summaries for multi-project repositories
|
|
51
|
+
|
|
52
|
+
### Testing
|
|
53
|
+
|
|
54
|
+
- Added Excepta FastAPI/React/Flutter and security-semantics fixtures/tests
|
|
55
|
+
- Total test suite is now 122 tests
|
|
56
|
+
- Three real-world regression families validated (ProxyShield, Flutter/Laravel multi-app, Excepta)
|
|
15
57
|
|
|
16
58
|
## [0.1.2-beta] — 2026-07-29
|
|
17
59
|
|
|
@@ -81,7 +123,9 @@ First public beta.
|
|
|
81
123
|
- Not a complete secret scanner
|
|
82
124
|
- Git “tracked secret” detection deferred
|
|
83
125
|
|
|
84
|
-
[Unreleased]: https://github.com/pranee54/AgentDoctor/compare/v0.1.
|
|
126
|
+
[Unreleased]: https://github.com/pranee54/AgentDoctor/compare/v0.1.4-beta...HEAD
|
|
127
|
+
[0.1.4-beta]: https://github.com/pranee54/AgentDoctor/releases/tag/v0.1.4-beta
|
|
128
|
+
[0.1.3-beta]: https://github.com/pranee54/AgentDoctor/releases/tag/v0.1.3-beta
|
|
85
129
|
[0.1.2-beta]: https://github.com/pranee54/AgentDoctor/releases/tag/v0.1.2-beta
|
|
86
130
|
[0.1.1-beta]: https://github.com/pranee54/AgentDoctor/releases/tag/v0.1.1-beta
|
|
87
131
|
[0.1.0-beta]: https://github.com/pranee54/AgentDoctor/releases/tag/v0.1.0-beta
|
package/README.md
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
# AgentDoctor
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@praneeth_54/agentdoctor)
|
|
4
|
-
[](https://github.com/pranee54/AgentDoctor/stargazers)
|
|
4
|
+
[](https://www.npmjs.com/package/@praneeth_54/agentdoctor)
|
|
6
5
|
[](https://github.com/pranee54/AgentDoctor/actions)
|
|
7
6
|
[](https://nodejs.org)
|
|
8
|
-
[](LICENSE)
|
|
9
8
|
|
|
10
9
|
**Lighthouse for AI coding agents.**
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
Audit coding-agent configuration before it becomes a repository problem.
|
|
12
|
+
|
|
13
|
+
AgentDoctor is a local CLI that inspects project-level AI coding agent setup — Cursor, Claude Code, and Codex — for security, instructions, context, and MCP configuration. Deterministic static analysis. No API key. No code upload by default.
|
|
13
14
|
|
|
14
15
|
```bash
|
|
15
16
|
npx @praneeth_54/agentdoctor
|
|
16
17
|
```
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
| -------------- | ----------------------------------------------------------------------------------- |
|
|
20
|
-
| **What it is** | A CLI health check for agent config in your repo |
|
|
21
|
-
| **Why use it** | Catch misconfigurations, sensitive context exposure, and instruction problems early |
|
|
22
|
-
| **Install** | `npx @praneeth_54/agentdoctor` or `npm install -g @praneeth_54/agentdoctor` |
|
|
23
|
-
| **Requires** | Node.js 20+ |
|
|
19
|
+
Public beta (`0.1.x-beta`). Readiness scoring and automatic fixes are not available yet.
|
|
24
20
|
|
|
25
21
|
---
|
|
26
22
|
|
|
27
|
-
##
|
|
23
|
+
## What you get
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
_Real scan of the included `insecure-agent-project` fixture using AgentDoctor v0.1.4-beta._
|
|
28
28
|
|
|
29
29
|
```text
|
|
30
30
|
$ npx @praneeth_54/agentdoctor
|
|
31
31
|
|
|
32
|
-
AgentDoctor v0.1.
|
|
32
|
+
🩺 AgentDoctor v0.1.4-beta
|
|
33
|
+
|
|
34
|
+
Scanning repository...
|
|
33
35
|
|
|
34
36
|
Repository
|
|
35
|
-
Framework:
|
|
36
|
-
Language:
|
|
37
|
+
Framework: Node.js
|
|
38
|
+
Language: JavaScript
|
|
37
39
|
Package manager: npm
|
|
38
|
-
Files scanned:
|
|
40
|
+
Files scanned: 7
|
|
39
41
|
|
|
40
42
|
AI Coding Agents
|
|
41
43
|
|
|
@@ -48,59 +50,134 @@ Findings
|
|
|
48
50
|
CRITICAL
|
|
49
51
|
|
|
50
52
|
✗ Sensitive environment file may enter agent context
|
|
51
|
-
.env
|
|
53
|
+
.env
|
|
52
54
|
Affected: Claude Code, Codex
|
|
53
|
-
Fix:
|
|
55
|
+
Fix: Add an agent-specific exclusion (for example .cursorignore or a
|
|
56
|
+
Claude Code Read deny rule), keep the file out of version control,
|
|
57
|
+
and rotate any credentials that may have been exposed.
|
|
58
|
+
|
|
59
|
+
✗ Private key or credential file present in repository
|
|
60
|
+
test-private-key.pem
|
|
61
|
+
Affected: Claude Code, Codex, Cursor
|
|
54
62
|
|
|
55
63
|
WARNING
|
|
56
64
|
|
|
57
|
-
!
|
|
58
|
-
|
|
65
|
+
! Claude Code bypassPermissions mode enabled
|
|
66
|
+
.claude/settings.json
|
|
59
67
|
|
|
60
68
|
Summary
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
3 critical
|
|
63
71
|
1 warning
|
|
64
72
|
0 info
|
|
65
73
|
|
|
66
|
-
Scoring
|
|
74
|
+
Scoring: not included in this release
|
|
67
75
|
```
|
|
68
76
|
|
|
77
|
+
Abbreviated text example from the same fixture for accessibility and search. Secret values are never printed.
|
|
78
|
+
|
|
69
79
|
---
|
|
70
80
|
|
|
71
|
-
## Why AgentDoctor
|
|
81
|
+
## Why AgentDoctor?
|
|
82
|
+
|
|
83
|
+
Repositories accumulate agent configuration quickly:
|
|
84
|
+
|
|
85
|
+
- Multiple instruction formats (`.cursor/rules`, `CLAUDE.md`, `AGENTS.md`)
|
|
86
|
+
- Stale path references in always-on instructions
|
|
87
|
+
- Ignore differences between `.gitignore`, `.cursorignore`, and agent defaults
|
|
88
|
+
- MCP filesystem scopes that are broader than intended
|
|
89
|
+
- Generated directories and large logs that waste context
|
|
90
|
+
- Credential-like files that may be readable by agents
|
|
91
|
+
- Conflicting assumptions about what each agent can see
|
|
72
92
|
|
|
73
|
-
|
|
93
|
+
Manually reviewing all of that across Cursor, Claude Code, and Codex is slow and inconsistent. AgentDoctor provides one deterministic local audit with stable rule IDs, evidence paths, and affected-agent information.
|
|
74
94
|
|
|
75
|
-
|
|
|
95
|
+
| Analogy | Domain |
|
|
76
96
|
| --------------- | -------------------------------- |
|
|
77
97
|
| Lighthouse | Web pages |
|
|
78
98
|
| `npm audit` | Dependencies |
|
|
79
99
|
| ESLint | Source code |
|
|
80
100
|
| **AgentDoctor** | **AI coding agent environments** |
|
|
81
101
|
|
|
82
|
-
AgentDoctor analyzes configuration
|
|
102
|
+
AgentDoctor analyzes configuration. It does not run agents, call an LLM, or modify your repository in this release.
|
|
83
103
|
|
|
84
104
|
---
|
|
85
105
|
|
|
86
|
-
##
|
|
106
|
+
## Before / after
|
|
87
107
|
|
|
88
|
-
|
|
108
|
+
**Before**
|
|
109
|
+
|
|
110
|
+
A repository may contain:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
.cursor/rules/
|
|
114
|
+
AGENTS.md
|
|
115
|
+
CLAUDE.md
|
|
116
|
+
.claude/settings.json
|
|
117
|
+
.mcp.json
|
|
118
|
+
.env
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Potential problems stay invisible until something leaks into model context, CI, or a teammate’s agent session:
|
|
122
|
+
|
|
123
|
+
- environment or credential-like files reachable by agents
|
|
124
|
+
- stale instruction path references
|
|
125
|
+
- broad MCP filesystem access
|
|
126
|
+
- oversized always-on context
|
|
127
|
+
|
|
128
|
+
**Run**
|
|
89
129
|
|
|
90
130
|
```bash
|
|
91
|
-
npx @praneeth_54/agentdoctor
|
|
131
|
+
npx @praneeth_54/agentdoctor
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**After**
|
|
135
|
+
|
|
136
|
+
You get deterministic findings with:
|
|
137
|
+
|
|
138
|
+
- stable rule IDs (for example `security/env-file-exposure`)
|
|
139
|
+
- evidence paths
|
|
140
|
+
- affected agents when exposure claims are supported
|
|
141
|
+
- conservative recommendations
|
|
142
|
+
|
|
143
|
+
Automatic repair is **not** included in this beta. Findings tell you what to review; you decide what to change.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Quick start
|
|
148
|
+
|
|
149
|
+
### One-shot (recommended)
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
npx @praneeth_54/agentdoctor
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Pin a beta version when you need a fixed install:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
npx @praneeth_54/agentdoctor@0.1.4-beta
|
|
92
159
|
```
|
|
93
160
|
|
|
94
161
|
### Global (optional)
|
|
95
162
|
|
|
96
163
|
```bash
|
|
97
|
-
npm install -g @praneeth_54/agentdoctor
|
|
164
|
+
npm install -g @praneeth_54/agentdoctor
|
|
98
165
|
agentdoctor
|
|
99
166
|
```
|
|
100
167
|
|
|
101
|
-
|
|
168
|
+
### Common commands
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
agentdoctor .
|
|
172
|
+
agentdoctor . --json
|
|
173
|
+
agentdoctor . --verbose
|
|
174
|
+
agentdoctor explain security/env-file-exposure
|
|
175
|
+
agentdoctor doctor
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Package name: `@praneeth_54/agentdoctor` (npm blocks the unscoped name). CLI binary: `agentdoctor`. Requires **Node.js 20+**.
|
|
102
179
|
|
|
103
|
-
###
|
|
180
|
+
### Programmatic API
|
|
104
181
|
|
|
105
182
|
```bash
|
|
106
183
|
npm install @praneeth_54/agentdoctor
|
|
@@ -111,218 +188,148 @@ import { scan } from "@praneeth_54/agentdoctor";
|
|
|
111
188
|
|
|
112
189
|
const result = await scan({ cwd: process.cwd() });
|
|
113
190
|
console.log(result.summary);
|
|
191
|
+
console.log(result.agentSecurityAnalysis); // "full" | "limited"
|
|
114
192
|
```
|
|
115
193
|
|
|
116
194
|
---
|
|
117
195
|
|
|
118
|
-
##
|
|
196
|
+
## Supported agents
|
|
119
197
|
|
|
120
|
-
|
|
121
|
-
# Scan the current directory
|
|
122
|
-
npx @praneeth_54/agentdoctor
|
|
198
|
+
Project-level configuration only (repository files). Global user settings are not scanned.
|
|
123
199
|
|
|
124
|
-
|
|
125
|
-
|
|
200
|
+
| Agent | What AgentDoctor inspects |
|
|
201
|
+
| --------------- | ---------------------------------------------------------------------- |
|
|
202
|
+
| **Cursor** | `.cursor/rules/*.mdc`, `.cursorignore`, Cursor MCP config, `AGENTS.md` |
|
|
203
|
+
| **Claude Code** | `CLAUDE.md`, `.claude/settings*.json`, `.claude/rules`, MCP config |
|
|
204
|
+
| **Codex** | `AGENTS.md` / overrides, project `.codex/` configuration |
|
|
126
205
|
|
|
127
|
-
|
|
128
|
-
npx @praneeth_54/agentdoctor --json
|
|
206
|
+
Additional adapters are planned — see [ROADMAP.md](ROADMAP.md).
|
|
129
207
|
|
|
130
|
-
|
|
131
|
-
npx @praneeth_54/agentdoctor --verbose
|
|
208
|
+
---
|
|
132
209
|
|
|
133
|
-
|
|
134
|
-
npx @praneeth_54/agentdoctor explain security/env-file-exposure
|
|
210
|
+
## Finding categories
|
|
135
211
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
212
|
+
| Category | Examples |
|
|
213
|
+
| ---------------- | --------------------------------------------------------------------- |
|
|
214
|
+
| **Security** | Env-file exposure, private-key filenames, broad MCP filesystem scopes |
|
|
215
|
+
| **Context** | Large instruction files, large logs, unignored generated directories |
|
|
216
|
+
| **Instructions** | Empty instructions, duplicate content, missing path references |
|
|
217
|
+
| **MCP** | Malformed MCP config, high-risk filesystem path arguments |
|
|
139
218
|
|
|
140
|
-
|
|
219
|
+
Full catalog with severities and fixability: [docs/rules.md](docs/rules.md).
|
|
141
220
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
| Capability | Status |
|
|
145
|
-
| ------------------------------------------------------- | ------- |
|
|
146
|
-
| Zero-config first run | ✓ |
|
|
147
|
-
| Works offline / no API key | ✓ |
|
|
148
|
-
| Detects project-level agent configuration | ✓ |
|
|
149
|
-
| Deterministic security / context / instruction findings | ✓ |
|
|
150
|
-
| Inspects supported MCP project configuration | ✓ |
|
|
151
|
-
| Stable JSON output for CI | ✓ |
|
|
152
|
-
| `explain <rule>` documentation | ✓ |
|
|
153
|
-
| Readiness scoring | Planned |
|
|
154
|
-
| Safe automatic fixes | Planned |
|
|
155
|
-
| Official GitHub Action package | Planned |
|
|
156
|
-
|
|
157
|
-
### Feature comparison
|
|
158
|
-
|
|
159
|
-
| Concern | Manual review | Generic linters | AgentDoctor |
|
|
160
|
-
| -------------------------------------------- | ------------- | --------------- | ---------------- |
|
|
161
|
-
| Agent instruction files present and usable | Manual | — | ✓ |
|
|
162
|
-
| Empty or duplicated instructions | Manual | — | ✓ |
|
|
163
|
-
| Sensitive filenames vs agent access patterns | Manual | Partial | ✓ (conservative) |
|
|
164
|
-
| Broad MCP filesystem scopes | Manual | — | ✓ |
|
|
165
|
-
| Large always-on instruction files | Manual | — | ✓ |
|
|
166
|
-
| Uploads repository by default | — | Sometimes | **Never** |
|
|
221
|
+
Explain any rule:
|
|
167
222
|
|
|
168
|
-
|
|
223
|
+
```bash
|
|
224
|
+
npx @praneeth_54/agentdoctor explain security/env-file-exposure
|
|
225
|
+
```
|
|
169
226
|
|
|
170
|
-
|
|
227
|
+
---
|
|
171
228
|
|
|
172
|
-
|
|
229
|
+
## Privacy and trust
|
|
173
230
|
|
|
174
|
-
|
|
175
|
-
| ----------- | ------------------------------------------ |
|
|
176
|
-
| Cursor | Rules, ignore files, MCP, `AGENTS.md` |
|
|
177
|
-
| Claude Code | Instructions, settings, rules, MCP |
|
|
178
|
-
| Codex | `AGENTS.md` / overrides, project `.codex/` |
|
|
231
|
+
**Scans run locally on your machine.**
|
|
179
232
|
|
|
180
|
-
|
|
233
|
+
AgentDoctor:
|
|
181
234
|
|
|
182
|
-
|
|
235
|
+
- does not require an API key
|
|
236
|
+
- does not upload repository contents by default
|
|
237
|
+
- does not call an LLM for core scanning
|
|
238
|
+
- does not execute MCP servers
|
|
239
|
+
- does not execute project code
|
|
240
|
+
- never prints secret values from files it flags by name
|
|
241
|
+
- enforces repository boundary checks for path references and symlink escape
|
|
183
242
|
|
|
184
|
-
|
|
243
|
+
This is still software that reads untrusted repository trees. Treat findings as guidance, not a security certification. AgentDoctor is **not** a complete secret-content scanner.
|
|
185
244
|
|
|
186
245
|
---
|
|
187
246
|
|
|
188
|
-
##
|
|
247
|
+
## CI usage
|
|
189
248
|
|
|
190
|
-
|
|
191
|
-
┌─────────────┐
|
|
192
|
-
│ Discovery │ bounded filesystem walk
|
|
193
|
-
└──────┬──────┘
|
|
194
|
-
▼
|
|
195
|
-
┌─────────────────┐
|
|
196
|
-
│ Project detect │ language / framework / package manager
|
|
197
|
-
└──────┬──────────┘
|
|
198
|
-
▼
|
|
199
|
-
┌─────────────────┐
|
|
200
|
-
│ Agent adapters │ Cursor · Claude Code · Codex
|
|
201
|
-
└──────┬──────────┘
|
|
202
|
-
▼
|
|
203
|
-
┌─────────────────┐
|
|
204
|
-
│ Rule engine │ security · context · instructions · MCP
|
|
205
|
-
└──────┬──────────┘
|
|
206
|
-
▼
|
|
207
|
-
┌─────────────────┐
|
|
208
|
-
│ Findings │ deterministic IDs · deduped · fixability metadata
|
|
209
|
-
└──────┬──────────┘
|
|
210
|
-
▼
|
|
211
|
-
┌─────────────────┐
|
|
212
|
-
│ Reporters │ terminal · JSON
|
|
213
|
-
└─────────────────┘
|
|
214
|
-
```
|
|
249
|
+
### GitHub Action
|
|
215
250
|
|
|
216
|
-
|
|
251
|
+
Run AgentDoctor directly in a workflow:
|
|
217
252
|
|
|
218
|
-
|
|
253
|
+
```yaml
|
|
254
|
+
permissions:
|
|
255
|
+
contents: read
|
|
219
256
|
|
|
220
|
-
|
|
257
|
+
steps:
|
|
258
|
+
- uses: actions/checkout@v4
|
|
221
259
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
260
|
+
- name: Audit coding-agent configuration
|
|
261
|
+
id: agentdoctor
|
|
262
|
+
uses: pranee54/AgentDoctor@v0.1.4-beta
|
|
263
|
+
with:
|
|
264
|
+
path: .
|
|
265
|
+
output-file: agentdoctor-report.json
|
|
225
266
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
"primaryLanguage": "typescript",
|
|
232
|
-
"filesScanned": 46
|
|
233
|
-
},
|
|
234
|
-
"agents": [
|
|
235
|
-
{
|
|
236
|
-
"id": "cursor",
|
|
237
|
-
"detected": true,
|
|
238
|
-
"configured": true,
|
|
239
|
-
"status": "configured"
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
"findings": [
|
|
243
|
-
{
|
|
244
|
-
"id": "security/env-file-exposure:.env.production",
|
|
245
|
-
"ruleId": "security/env-file-exposure",
|
|
246
|
-
"category": "security",
|
|
247
|
-
"severity": "critical",
|
|
248
|
-
"title": "Sensitive environment file may enter agent context",
|
|
249
|
-
"affectedAgents": ["claude-code", "codex"],
|
|
250
|
-
"fixability": "review"
|
|
251
|
-
}
|
|
252
|
-
],
|
|
253
|
-
"summary": { "critical": 1, "warning": 0, "info": 0, "total": 1 },
|
|
254
|
-
"scoringAvailable": false,
|
|
255
|
-
"scores": null
|
|
256
|
-
}
|
|
267
|
+
- name: Upload AgentDoctor report
|
|
268
|
+
uses: actions/upload-artifact@v4
|
|
269
|
+
with:
|
|
270
|
+
name: agentdoctor-report
|
|
271
|
+
path: ${{ steps.agentdoctor.outputs.report-path }}
|
|
257
272
|
```
|
|
258
273
|
|
|
259
|
-
|
|
274
|
+
The action installs the published `@praneeth_54/agentdoctor@0.1.4-beta` package, runs it with
|
|
275
|
+
`--ci --json`, and writes the report inside the checked-out workspace. It sets up Node.js 20
|
|
276
|
+
for the CLI. The optional `version` input accepts an exact npm version or the `latest` / `beta`
|
|
277
|
+
dist-tag.
|
|
260
278
|
|
|
261
|
-
|
|
279
|
+
### CLI
|
|
262
280
|
|
|
263
|
-
|
|
281
|
+
Use JSON directly in other CI systems:
|
|
264
282
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
283
|
+
```bash
|
|
284
|
+
npx @praneeth_54/agentdoctor --ci --json
|
|
285
|
+
```
|
|
268
286
|
|
|
269
|
-
-
|
|
270
|
-
- require authentication
|
|
271
|
-
- call an LLM
|
|
272
|
-
- execute project code
|
|
273
|
-
- start MCP servers
|
|
274
|
-
- enable telemetry by default
|
|
287
|
+
`--ci` runs non-interactively. Until readiness scoring ships, successful scans exit `0` even when findings exist, and `--min-score` is accepted but ignored.
|
|
275
288
|
|
|
276
|
-
|
|
289
|
+
Exit codes: [docs/exit-codes.md](docs/exit-codes.md). Compatibility promises: [docs/compatibility.md](docs/compatibility.md).
|
|
277
290
|
|
|
278
291
|
---
|
|
279
292
|
|
|
280
|
-
##
|
|
281
|
-
|
|
282
|
-
**Does AgentDoctor require an API key?**
|
|
283
|
-
No. Core scanning is local and deterministic.
|
|
284
|
-
|
|
285
|
-
**Is this a secret scanner?**
|
|
286
|
-
No. It uses conservative filename and configuration heuristics. It never prints secret values and does not claim complete coverage.
|
|
293
|
+
## Beta limitations
|
|
287
294
|
|
|
288
|
-
|
|
289
|
-
Not in this release. `agentdoctor fix` is reserved for a future safe-fix mode.
|
|
295
|
+
Honest limits of the current public beta:
|
|
290
296
|
|
|
291
|
-
|
|
292
|
-
|
|
297
|
+
| Limitation | Status |
|
|
298
|
+
| ----------------------------------- | --------------------------------------------------------------- |
|
|
299
|
+
| Readiness scoring | Not available (`scores` is `null`, `scoringAvailable: false`) |
|
|
300
|
+
| `--min-score` | Accepted, ignored until scoring ships |
|
|
301
|
+
| Automatic fixes (`agentdoctor fix`) | Stub only — does not modify files |
|
|
302
|
+
| Secret-content scanning | Filename / config heuristics only |
|
|
303
|
+
| Detection style | Intentionally conservative; false security findings are avoided |
|
|
304
|
+
| Agent coverage | Cursor, Claude Code, Codex project configs |
|
|
293
305
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
npx @praneeth_54/agentdoctor explain <rule-id>
|
|
298
|
-
```
|
|
306
|
+
See [CHANGELOG.md](CHANGELOG.md) and [docs/release-notes-v0.1.4-beta.md](docs/release-notes-v0.1.4-beta.md).
|
|
299
307
|
|
|
300
308
|
---
|
|
301
309
|
|
|
302
|
-
##
|
|
310
|
+
## Architecture
|
|
303
311
|
|
|
304
|
-
|
|
312
|
+
```text
|
|
313
|
+
Discovery → Project detect → Agent adapters → Rule engine → Findings → Terminal / JSON
|
|
314
|
+
```
|
|
305
315
|
|
|
306
|
-
|
|
307
|
-
| ---------------------------------------------- | --------------------------- |
|
|
308
|
-
| [docs/architecture.md](docs/architecture.md) | Pipeline and package layout |
|
|
309
|
-
| [docs/rules.md](docs/rules.md) | Stable rule IDs |
|
|
310
|
-
| [docs/exit-codes.md](docs/exit-codes.md) | Process exit codes |
|
|
311
|
-
| [docs/compatibility.md](docs/compatibility.md) | Beta compatibility promises |
|
|
312
|
-
| [docs/development.md](docs/development.md) | Local development |
|
|
313
|
-
| [ROADMAP.md](ROADMAP.md) | Near- and medium-term plans |
|
|
314
|
-
| [CHANGELOG.md](CHANGELOG.md) | Release history |
|
|
316
|
+
Details: [docs/architecture.md](docs/architecture.md)
|
|
315
317
|
|
|
316
318
|
---
|
|
317
319
|
|
|
318
|
-
##
|
|
319
|
-
|
|
320
|
-
See [ROADMAP.md](ROADMAP.md). Highlights:
|
|
320
|
+
## Documentation
|
|
321
321
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
| Doc | Contents |
|
|
323
|
+
| ------------------------------------------------------------------ | ------------------------------ |
|
|
324
|
+
| [docs/README.md](docs/README.md) | Documentation index |
|
|
325
|
+
| [docs/architecture.md](docs/architecture.md) | Scan pipeline |
|
|
326
|
+
| [docs/rules.md](docs/rules.md) | Stable rule IDs |
|
|
327
|
+
| [docs/exit-codes.md](docs/exit-codes.md) | Process exit codes |
|
|
328
|
+
| [docs/compatibility.md](docs/compatibility.md) | Beta compatibility promises |
|
|
329
|
+
| [docs/development.md](docs/development.md) | Local development |
|
|
330
|
+
| [docs/github-launch-checklist.md](docs/github-launch-checklist.md) | GitHub About / topics / launch |
|
|
331
|
+
| [ROADMAP.md](ROADMAP.md) | Near- and medium-term plans |
|
|
332
|
+
| [CHANGELOG.md](CHANGELOG.md) | Release history |
|
|
326
333
|
|
|
327
334
|
---
|
|
328
335
|
|
|
@@ -331,19 +338,29 @@ See [ROADMAP.md](ROADMAP.md). Highlights:
|
|
|
331
338
|
Issues and pull requests are welcome.
|
|
332
339
|
|
|
333
340
|
1. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
334
|
-
2.
|
|
335
|
-
3. Report security issues via [SECURITY.md](SECURITY.md)
|
|
341
|
+
2. Prefer [good first issues](docs/good-first-issues.md) ideas
|
|
342
|
+
3. Report security issues via [SECURITY.md](SECURITY.md) — never paste real secrets into issues
|
|
336
343
|
|
|
337
344
|
```bash
|
|
338
345
|
git clone https://github.com/pranee54/AgentDoctor.git
|
|
339
346
|
cd AgentDoctor
|
|
340
347
|
npm install
|
|
341
|
-
npm run
|
|
348
|
+
npm run verify
|
|
342
349
|
node dist/cli/index.js ./fixtures/clean-configured-project
|
|
343
350
|
```
|
|
344
351
|
|
|
345
352
|
---
|
|
346
353
|
|
|
354
|
+
## Next steps
|
|
355
|
+
|
|
356
|
+
- **Try it:** `npx @praneeth_54/agentdoctor`
|
|
357
|
+
- **Report a false positive / false negative:** use the issue templates (include version, rule ID, anonymized evidence — no secrets)
|
|
358
|
+
- **Propose a rule or adapter:** [feature request](.github/ISSUE_TEMPLATE/feature_request.md) / [rule proposal](.github/ISSUE_TEMPLATE/rule_proposal.md)
|
|
359
|
+
- **Contribute:** [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
360
|
+
- **Useful?** Star or watch the repository so you see updates
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
347
364
|
## License
|
|
348
365
|
|
|
349
366
|
[MIT](LICENSE) © AgentDoctor Contributors
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "0.1.
|
|
1
|
+
export declare const PACKAGE_VERSION = "0.1.4-beta";
|
|
2
2
|
export declare const DEFAULT_MAX_FILE_SIZE_BYTES: number;
|
|
3
3
|
/** Directories skipped during normal discovery (unless a rule needs them later). */
|
|
4
4
|
export declare const DEFAULT_IGNORE_DIRECTORIES: Set<string>;
|
package/dist/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = "0.1.
|
|
1
|
+
export const PACKAGE_VERSION = "0.1.4-beta";
|
|
2
2
|
export const DEFAULT_MAX_FILE_SIZE_BYTES = 2 * 1024 * 1024; // 2 MiB
|
|
3
3
|
/** Directories skipped during normal discovery (unless a rule needs them later). */
|
|
4
4
|
export const DEFAULT_IGNORE_DIRECTORIES = new Set([
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import type { RuleDefinition } from "../types.js";
|
|
2
|
+
export type EnvFileKind = "runtime" | "template" | "backup";
|
|
3
|
+
/**
|
|
4
|
+
* Classify environment-like filenames. Precision over recall.
|
|
5
|
+
* Does not inspect file contents.
|
|
6
|
+
*/
|
|
7
|
+
export declare function classifyEnvBasename(base: string): EnvFileKind | null;
|
|
2
8
|
export declare const envFileExposureRule: RuleDefinition;
|