Skip to content

Sheet 02· Code analysis

Risk at the source.

Paste your code into Wariva or upload its archive; the analysis runs entirely locally and the code never reaches a target or the network. Static analysis finds the risky line, the secret scan finds an embedded key, and neither stays in a separate tool — both are written into the same queue with a CWE/OWASP tag. A found secret value is masked.

payments-api/app/config.py local network requests · 0
  1. 40 def connect(settings):
  2. 41 dsn = os.environ["DB_DSN"]
  3. 42 aws_secret = "wJalrXUtnFEMI/K7••••••••••••" secret
  4. 43 region = "eu-central-1"
  5. 44 cmd = f"pg_dump {dsn}"
  6. 45 subprocess.run(cmd, shell=True) CWE-78
  7. 46 return Backup(region)
local analysis secret value masked

Stays local

The code never leaves the machine.

Whether the source is pasted or uploaded as an archive, the analysis happens inside Wariva. No stage connects to a target, sends the code out or runs it.

no network · no contact with a target
  1. 01 Input

    Paste or archive

    You paste a snippet directly or upload an archive (.zip, .tar.gz). On extraction, path traversal and symbolic links are rejected; size and entry count are capped.

  2. 02 Local analysis

    Two engines, one boundary

    Static analysis and the secret scan run in the same isolated environment. Not a single request goes out; the code never leaves your organisation’s store.

  3. 03 Queue

    The same findings queue

    Each finding lands in the main queue with its file and line, its rule id and its CWE/OWASP mapping. It is subject to the same status, priority and evidence language as every other finding.

Two parts

Static analysis and secret scanning.

Source-code analysis is two separate checks. Both run locally, and both write their findings into the same queue.

Static analysis

Finds the risky pattern on the line

Static analysis runs through semgrep and, without executing the code, looks for known unsafe patterns: command injection, insecure deserialization, weak crypto use and the like. Each finding comes with its file, line and rule id.

rule
python.lang.security.dangerous-subprocess-use
loc
config.py:45
map
CWE-78 · OWASP A03:2021 · Injection

semgrep runs when it is configured in your installation. If it is not, static analysis is skipped; the secret scan still runs. Supported languages are limited to the languages semgrep supports.

Secret scanning

Catches an embedded key, masks the value

The secret scan is Wariva’s own Go scanner: it looks for API keys, passwords and tokens embedded in the code. A found value is never shown as it is; the finding carries only a masked preview.

rule
wariva-secrets/aws-secret-access-key
loc
config.py:42
map
CWE-798 · OWASP A07:2021 · Authentication

Only high-confidence patterns are flagged. A loose, unassigned 40-character AWS secret key is not caught: the aim is to keep false alarms low.

Result

One finding, down to the line.

A hand-drawn example: an AWS secret key embedded in a file of the payments-api archive. Every field is stored separately in the product; the secret value stays masked.

Exposure High Open

Hard-coded AWS secret access key

Asset
payments-api
Location
app/config.py:42
Rule
wariva-secrets/aws-secret-access-key
Mapping
CWE-798 · OWASP A07:2021
Source
codescan

Masked preview

aws_secret_access_key wJalrXUtnFEMI/K7••••••••••••

A secret value is never stored or logged as it is; only a masked preview is kept.

Evidence locator archive://payments-api/app/config.py#L42

Why this priority

A credential embedded in code, matched by a high-confidence pattern. The queue rule set capped it at High; there is no CVE or KEV match.

Hand-drawn sample · synthetic data

Technical legend

Input, engines, limits.

For the reader who wants to verify: what is accepted, what runs, and what is stored on every finding.

Input and format

Paste
a single source snippet Code pasted directly; you give the file name.
Archive
.zip · .tar.gz On extraction, path traversal and symbolic links are rejected.
Limits
size · entry count Archive size and entry count are capped.
Locality
no network The code is not sent to a target or the network, and is not run.

Engines

Static analysis
semgrep When configured at install. Languages follow semgrep.
Secret scan
wariva-secrets Wariva’s Go scanner. High-confidence patterns only.
Process
isolated · no outbound The analysis runs in a separate process with no network access.

Finding

Mapping
CWE · OWASP Each finding carries a rule id and a CWE/OWASP mapping.
Queue
Exposure Written to the main findings queue with the codescan source.
Secret value
masked The value is not stored as it is; only a masked preview.
Evidence
file · line · rule The locator points at the file and line inside the archive.

What it never does

  • Run your code
  • Connect to a target or the network
  • Store a secret value as it is
  • Decide priority on its own

Honest limits

What it will not say.

Source-code analysis is a disciplined first filter, not a complete security review. The following are not claims of the product.

  1. 01

    finds every vulnerability

    Static analysis flags only known, high-confidence patterns. Not every risk in your code fits those patterns; a clean result does not mean the code is secure.

  2. 02

    covers every language

    Static analysis runs only when semgrep is configured and for the languages it supports. In an unsupported language static analysis is skipped; the secret scan still runs.

  3. 03

    AI fixes it

    Wariva does not change, patch or run your code. It shows the finding with its file and line; the decision to fix and the fix itself are yours.

  4. 04

    no secret means clean

    The absence of a secret does not prove you are safe. Loose, unassigned secrets such as a bare 40-character AWS secret key are deliberately not caught.

Questions

What you should ask.

01 Does my code leave Wariva?

No. The analysis runs entirely locally: the code you paste or the archive you upload is scanned inside your organisation’s environment, in a separate process with no network access. The code is not sent to a target or any external service, and is not executed.

02 Static analysis is not running; why?

Static analysis runs through semgrep and only engages when semgrep is configured in your installation. If it is not, static analysis is skipped; Wariva’s own secret scan still runs. semgrep also runs rules only for the languages it supports.

03 Where and how is a found secret shown?

A found secret value is never shown as it is or logged; the finding carries only a masked preview (for example wJalr…••••). The evidence is the location — which file and line the secret appears on — not the value itself.

04 Does it catch every secret?

No. The secret scan looks only for high-confidence patterns and deliberately skips loose values to keep false alarms low. A bare 40-character AWS secret key that is not assigned to a variable, for instance, is not caught. A clean result does not prove there are no secrets in your code.

05 Do the findings stay apart from the other tools?

No. Every source-code finding drops into the main findings queue in the Exposure category, with its rule id and CWE/OWASP mapping. Status, assignment, priority and the evidence chain are exactly the same as for every other finding.

Next step

Let's chart your waters.

See it with your own SBOM and your own domain. In a demo session with nothing to install, review your first findings together with their source and evidence.