pinata-security-cli 0.4.0 → 0.5.0

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 CHANGED
@@ -90,7 +90,8 @@ dist/
90
90
  --dry-run # Preview generated tests without running
91
91
  --confidence <level> # high (default), medium, low
92
92
  --output <format> # terminal, json, sarif, junit, markdown
93
- --domain <domain> # security, data, concurrency, etc.
93
+ --output-file <path> # Write results to file (for SARIF upload)
94
+ --domains <domains> # security, data, concurrency, etc.
94
95
  --severity <level> # critical, high, medium, low
95
96
  --exclude <dirs> # Comma-separated directories to skip
96
97
  ```
@@ -149,21 +150,50 @@ pinata analyze . --execute --dry-run
149
150
 
150
151
  ## CI/CD Integration
151
152
 
152
- **GitHub Actions**
153
+ **GitHub Action (recommended)**
154
+
153
155
  ```yaml
154
156
  name: Security Scan
155
157
  on: [push, pull_request]
156
158
 
157
159
  jobs:
158
- pinata:
160
+ security:
159
161
  runs-on: ubuntu-latest
162
+ permissions:
163
+ contents: read
164
+ security-events: write
160
165
  steps:
161
166
  - uses: actions/checkout@v4
162
- - name: Run Pinata
163
- run: npx --yes pinata-security-cli@latest analyze . --output sarif > results.sarif
164
- - uses: github/codeql-action/upload-sarif@v3
167
+ - uses: christiancattaneo/pinata-security@v1
165
168
  with:
166
- sarif_file: results.sarif
169
+ confidence: high
170
+ sarif-output: pinata.sarif
171
+ # Optional: AI verification
172
+ # with:
173
+ # verify: true
174
+ # env:
175
+ # ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
176
+ ```
177
+
178
+ **Action inputs:**
179
+ - `path` - Directory to scan (default: `.`)
180
+ - `confidence` - high, medium, low (default: `high`)
181
+ - `domains` - Comma-separated domains to scan
182
+ - `verify` - Enable AI verification (default: `false`)
183
+ - `fail-on-gaps` - Fail if gaps found (default: `true`)
184
+ - `sarif-output` - Path for SARIF file (auto-uploads to GitHub Security)
185
+
186
+ **Action outputs:**
187
+ - `score` - Pinata score (0-100)
188
+ - `gaps` - Number of gaps found
189
+ - `sarif-file` - Path to SARIF file
190
+
191
+ **Manual workflow (any CI)**
192
+ ```yaml
193
+ - run: npx --yes pinata-security-cli@latest analyze . --output sarif --output-file results.sarif
194
+ - uses: github/codeql-action/upload-sarif@v3
195
+ with:
196
+ sarif_file: results.sarif
167
197
  ```
168
198
 
169
199
  **GitLab CI**