argus-ci 1.1.0 → 1.1.1
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/README.md +41 -92
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,26 +20,16 @@ Catches: injection, XSS, hardcoded secrets, insecure crypto, path traversal, pro
|
|
|
20
20
|
## Requirements
|
|
21
21
|
|
|
22
22
|
- Node.js ≥ 18
|
|
23
|
-
-
|
|
24
|
-
- `ANTHROPIC_API_KEY` — only needed for the conversational agent interface
|
|
23
|
+
- `ANTHROPIC_API_KEY` — only needed for the conversational agent (`argus-ci chat`)
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Install
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install -g argus-ci
|
|
32
|
-
# or use without installing:
|
|
33
|
-
npx argus-ci
|
|
34
|
-
```
|
|
25
|
+
> **Semgrep is installed automatically** by `npx argus-ci setup`. No manual install needed.
|
|
35
26
|
|
|
36
27
|
---
|
|
37
28
|
|
|
38
29
|
## 1. Add to your AI editor (MCP)
|
|
39
30
|
|
|
40
|
-
|
|
31
|
+
Open **Cursor Settings → MCP** and add:
|
|
41
32
|
|
|
42
|
-
**Cursor** — Settings → MCP → add:
|
|
43
33
|
```json
|
|
44
34
|
{
|
|
45
35
|
"argus-ci": {
|
|
@@ -61,13 +51,7 @@ This is the main use case. Once added, your AI agent will automatically scan eve
|
|
|
61
51
|
}
|
|
62
52
|
```
|
|
63
53
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
# Copy the trigger instructions into your repo
|
|
68
|
-
cp node_modules/argus-ci/CLAUDE.md ./CLAUDE.md
|
|
69
|
-
cp node_modules/argus-ci/.cursorrules ./.cursorrules
|
|
70
|
-
```
|
|
54
|
+
The MCP server registers as **"argus"** in Cursor's tool panel.
|
|
71
55
|
|
|
72
56
|
### MCP tools available
|
|
73
57
|
|
|
@@ -80,9 +64,9 @@ cp node_modules/argus-ci/.cursorrules ./.cursorrules
|
|
|
80
64
|
|
|
81
65
|
---
|
|
82
66
|
|
|
83
|
-
## 2.
|
|
67
|
+
## 2. Run setup in your repo
|
|
84
68
|
|
|
85
|
-
|
|
69
|
+
One command does everything — installs Semgrep, copies AI trigger files, and installs the pre-commit hook.
|
|
86
70
|
|
|
87
71
|
```bash
|
|
88
72
|
cd your-repo
|
|
@@ -91,92 +75,61 @@ npx argus-ci setup
|
|
|
91
75
|
|
|
92
76
|
Output:
|
|
93
77
|
```
|
|
94
|
-
|
|
95
|
-
Using semgrep 1.x.x
|
|
96
|
-
|
|
97
|
-
The hook will:
|
|
98
|
-
• Run on every git commit automatically
|
|
99
|
-
• Scan only the files you're committing (fast)
|
|
100
|
-
• Block the commit if any ERROR-severity issues are found
|
|
101
|
-
• Allow commits with only warnings
|
|
102
|
-
|
|
103
|
-
To remove: argus-ci setup --remove
|
|
104
|
-
To bypass: git commit --no-verify (emergency only)
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## 3. Conversational agent
|
|
78
|
+
🚀 argus-ci setup
|
|
110
79
|
|
|
111
|
-
|
|
80
|
+
⚙️ Semgrep not found — installing automatically...
|
|
81
|
+
→ brew install semgrep
|
|
82
|
+
✓ Semgrep installed (semgrep 1.x.x)
|
|
83
|
+
✓ CLAUDE.md written
|
|
84
|
+
✓ .cursorrules written
|
|
85
|
+
✓ Pre-commit hook installed
|
|
112
86
|
|
|
113
|
-
|
|
114
|
-
# Interactive REPL
|
|
115
|
-
argus-ci chat
|
|
116
|
-
|
|
117
|
-
# One-shot
|
|
118
|
-
argus-ci chat "review PR https://github.com/org/repo/pull/142"
|
|
119
|
-
argus-ci pr https://github.com/org/repo/pull/142
|
|
120
|
-
argus-ci scan --branch feature/auth
|
|
121
|
-
```
|
|
87
|
+
✅ Setup complete. argus-ci is now active in this repo.
|
|
122
88
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
```
|
|
89
|
+
What happens next:
|
|
90
|
+
• Every file your AI agent writes is scanned automatically (via MCP)
|
|
91
|
+
• Every commit is scanned — errors block the commit
|
|
92
|
+
• CLAUDE.md and .cursorrules tell your AI agent to run scans automatically
|
|
128
93
|
|
|
129
|
-
|
|
94
|
+
To review a PR: npx argus-ci pr <github-url>
|
|
95
|
+
To remove the hook: npx argus-ci setup --remove
|
|
130
96
|
```
|
|
131
|
-
You: review PR https://github.com/org/repo/pull/87
|
|
132
97
|
|
|
133
|
-
|
|
98
|
+
The setup does three things automatically:
|
|
99
|
+
- **Semgrep** — installed via Homebrew on macOS, pip3 elsewhere. Skipped if already installed.
|
|
100
|
+
- **CLAUDE.md / .cursorrules** — copied into the repo root. Tell the AI agent to call `scan_files` after every code generation.
|
|
101
|
+
- **Pre-commit hook** — written to `.git/hooks/pre-commit`. Blocks commits with ERROR-severity findings.
|
|
134
102
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
| Severity | Count |
|
|
138
|
-
|----------|-------|
|
|
139
|
-
| 🔴 Error | 2 |
|
|
140
|
-
| 🟡 Warning | 1 |
|
|
141
|
-
|
|
142
|
-
### `src/auth/login.ts`
|
|
143
|
-
|
|
144
|
-
**🔴 ERROR** — Line 34
|
|
145
|
-
> Timing attack: comparing secrets with === allows attackers to measure
|
|
146
|
-
> response time and guess tokens byte by byte.
|
|
147
|
-
`if (token === storedToken) {`
|
|
148
|
-
_Rule: `javascript.lang.security.audit.timing-attack`_
|
|
149
|
-
_CWE: CWE-208_
|
|
150
|
-
|
|
151
|
-
**Fix:** Use `crypto.timingSafeEqual(Buffer.from(token), Buffer.from(storedToken))`
|
|
152
|
-
```
|
|
103
|
+
To remove: `npx argus-ci setup --remove`
|
|
104
|
+
Emergency bypass: `git commit --no-verify` (not recommended)
|
|
153
105
|
|
|
154
106
|
---
|
|
155
107
|
|
|
156
|
-
##
|
|
108
|
+
## 3. Conversational agent
|
|
157
109
|
|
|
158
|
-
|
|
159
|
-
# Scan staged files (same as what the pre-commit hook runs)
|
|
160
|
-
argus-ci scan
|
|
110
|
+
Review a PR or branch in plain English. Requires `ANTHROPIC_API_KEY`.
|
|
161
111
|
|
|
162
|
-
|
|
163
|
-
|
|
112
|
+
```bash
|
|
113
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
164
114
|
|
|
165
|
-
#
|
|
166
|
-
argus-ci
|
|
115
|
+
# One-shot PR review
|
|
116
|
+
argus-ci pr https://github.com/org/repo/pull/142
|
|
167
117
|
|
|
168
|
-
#
|
|
169
|
-
argus-ci
|
|
118
|
+
# Interactive REPL
|
|
119
|
+
argus-ci chat
|
|
120
|
+
# You: review PR https://github.com/org/repo/pull/142
|
|
121
|
+
# You: check branch feature/payments
|
|
122
|
+
# You: what issues are in my current changes
|
|
170
123
|
```
|
|
171
124
|
|
|
172
125
|
---
|
|
173
126
|
|
|
174
|
-
##
|
|
127
|
+
## 4. GitHub Actions (CI gate)
|
|
175
128
|
|
|
176
129
|
Add to `.github/workflows/argus-ci.yml`:
|
|
177
130
|
|
|
178
131
|
```yaml
|
|
179
|
-
name:
|
|
132
|
+
name: argus-ci security scan
|
|
180
133
|
|
|
181
134
|
on:
|
|
182
135
|
pull_request:
|
|
@@ -207,11 +160,7 @@ jobs:
|
|
|
207
160
|
|
|
208
161
|
## Rulesets
|
|
209
162
|
|
|
210
|
-
Auto-detected from your project.
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
argus-ci scan --config '{"rulesets":["p/secrets","p/owasp-top-ten","p/nodejs"]}'
|
|
214
|
-
```
|
|
163
|
+
Auto-detected from your project. No config needed.
|
|
215
164
|
|
|
216
165
|
| Ruleset | When used |
|
|
217
166
|
|---------|-----------|
|
|
@@ -239,4 +188,4 @@ argus-ci scan --config '{"rulesets":["p/secrets","p/owasp-top-ten","p/nodejs"]}'
|
|
|
239
188
|
|
|
240
189
|
## License
|
|
241
190
|
|
|
242
|
-
MIT © [Venkat Swara Moyya](https://github.com/
|
|
191
|
+
MIT © [Venkat Swara Moyya](https://github.com/Naidu2404)
|
package/package.json
CHANGED