From nothing to your first findings.
Three steps, about five minutes. Start with preview — it needs no key and sends nothing, so you can see exactly what a scan would upload before you decide to run one.
Step 1 — Get a key
- Sign in to your CodePulse portal and open Extensions.
- Choose the stack, give the install a name you will recognise later (“Acme storefront”, “staging”), and press Create key.
- Copy the key. It looks like
cp_ext_…and is about 50 characters.
Step 2 — Install the package
Pick your stack. Each package is self-contained: the Node and Python ones have no dependencies at all.
Node · React · Next.js
npm i -D codepulse-scan
export CODEPULSE_KEY=cp_ext_...
npx codepulse preview # see what would be sent — sends nothing
npx codepulse scanPython · Django · Flask · FastAPI
pip install codepulse-scan
export CODEPULSE_KEY=cp_ext_...
codepulse preview
codepulse scanThe distribution is codepulse-scan; the module you import is codepulse and the command is codepulse. Python 3.8 and newer.
Laravel · PHP
composer require code-pulse/laravel
# .env
CODEPULSE_KEY=cp_ext_...
php artisan codepulse:preview
php artisan codepulse:scanShopify
npm i -D codepulse-shopify
export CODEPULSE_KEY=cp_ext_...
npx codepulse-shopify preview
npx codepulse-shopify scanIt understands a Shopify project’s layout — Liquid templates, sections, snippets and app code — rather than treating it as a generic folder.
WordPress
- Download the plugin zip (30 KB).
- Plugins → Add New → Upload Plugin, choose that zip, activate it.
- Open Tools → Code Pulse and paste the key.
- Pick which themes and plugins to include, press Preview to see the file list, then Scan now.
To keep the key out of the database, define it in wp-config.php instead — the settings screen will use it and stop asking:
define( 'CODEPULSE_KEY', 'cp_ext_...' );Step 3 — Read the findings
$ npx codepulse scan
Activating acme-shop against https://project-estimate.code-pulse.ai ...
products: developer, engineering-intelligence
Collecting source from /srv/acme-shop ...
7 files, 0.02 MB to upload
skipped 3: excluded by policy
redacted before upload: django-secret-key x1, stripe-key x1
Uploading ...
scan 128 accepted (7 files)
analysing ...
HIGH shop/views.py:6
SQL Injection Vulnerability
The search function builds a SQL query by string concatenation, so user input
reaches the query directly.
-> Use parameterised queries: c.execute('SELECT * FROM products WHERE name LIKE %s', [q])
[security]
4 findings in 7 files: 1 high, 3 mediumThe same findings appear in your portal under the install, with their full history.
Where to keep the key
In order of preference: an environment variable, a CI secret, or codepulse.json with that file in .gitignore.
{
"project": "acme-store",
"exclude": ["docs/", "fixtures/"]
}If you put the key in that file and it is not gitignored, every run warns you loudly.
--key flag. A key passed on the command line ends up in your shell history and in the process list, where other users on the machine can read it.Running it in CI
--fail-on turns findings into a build result. Progress goes to stderr, so --json on stdout stays pipeable.
# .github/workflows/codepulse.yml
- run: npm i -D codepulse-scan
- run: npx codepulse scan --fail-on high
env:
CODEPULSE_KEY: ${{ secrets.CODEPULSE_KEY }}# GitLab CI
codepulse:
script:
- pip install codepulse-scan
- codepulse scan --fail-on critical
variables:
CODEPULSE_KEY: $CODEPULSE_KEYStart with --fail-on critical so the pipeline only stops for things nobody would argue about, then tighten it once the backlog is clear.
Commands and options
| Command | What it does |
|---|---|
scan | Collect, upload, wait for findings |
preview | List what would be uploaded. Sends nothing, needs no key |
activate | Check the key and show what the account can do |
status <id> | Fetch the findings of an earlier scan |
| Option | Effect |
|---|---|
--path <dir> | Project directory (default: the current one) |
--project <name> | Project name reported to CodePulse |
--exclude <glob> | Extra gitignore-syntax pattern to skip; repeatable |
--truncate | If the project exceeds the limits, upload as much as fits |
--no-wait | Upload and exit without waiting for findings |
--json | Machine-readable JSON on stdout |
--limit <n> | Show at most n findings (0 = all, default 50) |
--fail-on <sev> | Exit 1 if any finding is this severity or worse |
--no-color | Plain output, for logs |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Clean, or findings below your --fail-on threshold |
| 1 | Findings at or above the threshold, or a usage problem |
| 2 | Unknown command |
| 3 | The key was refused — revoked, suspended, or no active subscription |
When something goes wrong
| What you see | What it means |
|---|---|
No CodePulse key found | The environment variable is not set in the shell that runs the command. In CI, check the secret name matches. |
That does not look like a CodePulse key | Usually a truncated paste. A key is cp_ext_ plus 43 characters. |
no_active_subscription | The key is valid but the plan has lapsed. Nothing was read and nothing was uploaded. |
revoked | This install was revoked in the portal. Create a new key. |
No source files to scan | You are probably not in the project root — use --path. Or a broad .gitignore is excluding everything; preview will show you. |
| Project over the limit | 2,000 files or 20 MB. Narrow it with --exclude, or pass --truncate to send what fits. |
Refusing to send your key over http:// | A custom CODEPULSE_URL is set to a plain-http address. Use https://. |
Too many requests | 30 calls a minute per key. Usually several CI jobs sharing one key — give each its own. |
Before you run your first scan
Run preview and read the output. It is the one step that turns everything on the What we receive page from a claim into something you have checked yourself.