CLI Tool
The Pemvosec CLI brings security scanning to your local development workflow. Run scans locally, integrate with CI/CD, and sync results with the platform.
Installation
npm install -g @pemvosec/cliAfter installation, verify it works:
pemvosec --versionQuick Start
- 1
Authenticate with the platform
pemvosec auth login - 2
Navigate to your project
cd /path/to/your/project - 3
Run your first scan
pemvosec scan . - 4
Review findings and fix issues
Results are displayed in the terminal. Critical and high severity findings include remediation guidance.
Commands
Run security scans on your code
pemvosec scan [path] [options]
Options
--typeScan type: sast, sca, secrets, iac, all (default: all)--severityMinimum severity to report: low, medium, high, critical--outputOutput format: json, sarif, table (default: table)--configPath to config file--fail-onExit with error on findings of severity: low, medium, high, criticalExamples
pemvosec scan .Scan current directory
pemvosec scan ./src --type sastRun SAST scan only
pemvosec scan . --severity high --fail-on criticalReport high+ and fail on critical
pemvosec scan . --output sarif > results.sarifExport to SARIF format
Authenticate with Pemvosec platform
pemvosec auth [command]
Options
loginLogin to Pemvosec (opens browser)logoutClear stored credentialsstatusShow current authentication statustokenDisplay current API tokenExamples
pemvosec auth loginLogin via browser
pemvosec auth statusCheck if authenticated
export PEMVOSEC_TOKEN=$(pemvosec auth token)Use token in scripts
Manage CLI configuration
pemvosec config [command]
Options
initInitialize config file in current directoryset <key> <value>Set a configuration valueget <key>Get a configuration valuelistList all configurationExamples
pemvosec config initCreate .pemvosec.yaml in project
pemvosec config set severity highSet default minimum severity
pemvosec config listShow all settings
Manage false positive ignores
pemvosec ignore [command]
Options
add <finding-id>Add finding to ignore listremove <finding-id>Remove from ignore listlistList all ignored findingssyncSync ignores with platformExamples
pemvosec ignore add ABC123 --reason "False positive"Ignore a finding
pemvosec ignore listShow ignored findings
pemvosec ignore syncPull ignores from platform
Generate and view reports
pemvosec report [command]
Options
generateGenerate a new report from last scanview <id>Open report in browserlistList recent reportsexport <id>Export report to fileExamples
pemvosec report generate --format pdfGenerate PDF report
pemvosec report listShow recent reports
Configuration File
Create a .pemvosec.yaml file in your project root to customize scan behavior.
# .pemvosec.yaml
version: 1
scan:
types:
- sast
- sca
- secrets
- iac
severity: medium # Minimum severity to report
exclude:
- node_modules/
- vendor/
- "**/*.test.js"
- "**/*.spec.ts"
fail_on: critical # Exit with error on critical findings
rules:
# Disable specific rules
disabled:
- SEC001
- SEC042
# Custom severity overrides
severity_overrides:
SEC015: low # Demote this finding
ignore:
# Ignore specific files/paths
paths:
- test/fixtures/
- docs/examples/
# Ignore by finding ID (from platform)
findings:
- fp_abc123
- fp_def456
reporting:
format: table # table, json, sarif
upload: true # Upload results to platform
CI/CD Integration
Integrate Pemvosec into your CI/CD pipeline for automated security scanning.
# .github/workflows/security.yml
name: Security Scan
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Pemvosec CLI
run: npm install -g @pemvosec/cli
- name: Run Security Scan
env:
PEMVOSEC_TOKEN: ${{ secrets.PEMVOSEC_TOKEN }}
run: |
pemvosec scan . \
--output sarif \
--fail-on critical \
> results.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarifStore token securely
Never commit your PEMVOSEC_TOKEN. Use CI/CD secrets management.
Exit Codes
| Code | Meaning |
|---|---|
0 | Success - No findings above threshold |
1 | Findings found above --fail-on threshold |
2 | Configuration or authentication error |
3 | Scan execution error |