Skip to content

How Veridence reads a repository, and where its figures come from

Every finding in a Veridence report comes from a stated rule. Every finding has a risk rating and an estimated cost to fix, from the hours published on this page. The table is produced by the engine itself, so what is published here is what is applied.

No model, no sampling

The engine uses no machine-learning model and samples nothing. Given the same commit it produces the same findings. A sample report shows the output on a demonstration codebase.

Five ways a finding is found

MethodApplies toWhat it does
Syntax treePython, JavaScript, TypeScriptThe file is parsed (Python with its own parser, JavaScript and TypeScript with tree-sitter) and checked by the structure of the code: secrets assigned to variables, SQL built from variables, weak hashing, dynamic execution, shell commands, unsafe deserialization, disabled certificate checks, discarded exceptions, and the complexity of every function.
Text patternInfrastructure files, access policies, other languages, and any file that does not parseFixed patterns for open network ingress, unencrypted or public storage, privileged containers, wildcard access policies, and recognisable credential formats. Credential formats are matched in every file.
Licence declarationLicence files, manifests, source headersA licence file is identified from its text; a manifest's licence field and SPDX-License-Identifier tags are read. Identifiers are classified against the SPDX licence list (version 8791eda, 740 licences). A file that only mentions a licence declares nothing.
Package registryDependencies in npm, PyPI, Go, Cargo, Maven, RubyGems and Composer filesEach dependency with a pinned version is looked up for its licence and its published security advisories. Development-only dependencies are never findings.
Commit historyGitHub repositoriesThe authors and dates of the 12 months of commits before the audited commit give the commit entropy, the bus factor and the largest contributor's share.

Product code, and everything else

A placeholder key in a test fixture is not a leaked credential, and a deliberately insecure call in a tutorial is not a flaw in the product. The engine decides from a file's path whether it is test, documentation or example code, using the conventions of each ecosystem (folders such as tests, docs and examples; file names such as test_*.py and *.spec.ts). Findings there are listed in the report under their own heading and carry no estimate. Dependencies declared only for tests, documentation or examples are treated as development dependencies. A file is treated as product code unless its path clearly says otherwise.

Two numbers for every finding

Risk says how much a finding could hurt: high, medium or low. Cost to fix says how much engineering work removes it. They answer different questions and are kept apart. A hardcoded credential is high risk and cheap to fix; a large tangled file is low risk and expensive to fix.

The cost to fix is published hours for each kind of finding, multiplied by $175 an hour, the rate of a senior engineer. It is shown as a range because the same kind of fix takes longer in some codebases than in others. When a kind of finding occurs several times in one file, each extra place adds a smaller amount, because the first fix carries the set-up. A report's range is the sum of its findings' ranges.

Kind of findingRiskHoursCost to fix (first place)What the work is
Copyleft licence declared in the repositoryHigh16–40 h$2,800 – $7,000Establish where the licensed code is used, then remove or replace it, or confirm the obligations are met. Legal review is not included.
Copyleft production dependencyHigh8–24 h$1,400 – $4,200Replace the package with a permissively licensed alternative, or obtain a commercial licence. Legal review is not included.
Production dependency with a high-severity vulnerabilityHigh2–8 h$350 – $1,400Upgrade the package to a fixed version and re-test the parts of the system that use it.
Key-person concentrationMedium40–80 h$7,000 – $14,000Document the system and pair the principal contributor with others to spread working knowledge. A retention arrangement is a commercial matter and is not included.
Leaked credential or insecure code patternHigh4–8 h, +1–2 h per extra place$700 – $1,400Revoke and rotate the credential, move it to a secrets store, remove it from the code and its history, and check access logs for misuse.
Infrastructure misconfigurationMedium1–4 h, +1–2 h per extra place$175 – $700Change the configuration, apply it to a staging environment and confirm the service still works.
Over-broad access policyHigh2–6 h, +1–2 h per extra place$350 – $1,050Replace the wildcard with the specific actions and resources the service needs, and test the deployment.
Very large source fileLow8–24 h$1,400 – $4,200Split the file along its responsibilities and re-test.
Empty catch blockLow0.5–1 h, +0.25–0.5 h per extra place$88 – $175Log or handle each error instead of discarding it.
SQL query built from variables (injection risk)High2–4 h, +1–2 h per extra place$350 – $700Replace string-built queries with parameterised queries and add tests with hostile input.
Hardcoded secret / API credentialHigh4–8 h, +1–2 h per extra place$700 – $1,400Revoke and rotate the credential, move it to a secrets store, remove it from the code and its history, and check access logs for misuse.
Use of cryptographically broken hashing (MD5 or SHA-1)Medium2–4 h, +1–2 h per extra place$350 – $700Replace MD5/SHA-1 with a modern algorithm. Longer if it protects stored passwords, which then need a migration.
Dynamic code execution (eval / exec)High3–6 h, +1–3 h per extra place$525 – $1,050Replace eval/exec with explicit logic or a safe parser, and add tests.
Command run through the system shellHigh2–4 h, +1–2 h per extra place$350 – $700Pass arguments as a list without the shell, or validate the input against an allow-list, and add tests.
Unsafe deserialization of untrusted dataHigh3–6 h, +2–4 h per extra place$525 – $1,050Switch to a safe format or a restricted loader, and add tests with malformed data.
TLS certificate verification disabledMedium1–2 h, +0.5–1 h per extra place$175 – $350Turn certificate verification back on and supply the right certificate authority where needed.
Exception handler that discards the errorLow0.5–1 h, +0.25–0.5 h per extra place$88 – $175Log or handle each error instead of discarding it.
High-complexity functionsMedium0.5–1 h per point above 15(points above 15) × 0.5–1 h × $175Split the functions into smaller ones and add tests: 0.5 to 1 hour for each point of complexity above 15.

What these figures are, and are not. The hours are Agiphi's working values for the engineering work each fix takes. They are not derived from a dataset of deals, and the cost to fix is not a valuation, a price adjustment or the cost of an incident. A buyer weighs the risk ratings and the findings themselves; the cost to fix tells them what cleaning the code up would take. Infrastructure findings that open a service to the internet, make data public or run with excess privilege are rated high; other infrastructure findings medium.

The formulas

Function complexity

The cyclomatic complexity of a function is one plus the number of its decision points: each if, loop, exception handler, conditional expression and boolean operator. A function above 15 is reported. The cost to fix for a file is:

sum over its functions of (complexity − 15) × 0.5 to 1 hours × $175

A function of complexity 43 is 28 points over the threshold: 14 to 28 hours of splitting and testing.

Vulnerable dependencies

A production dependency with a published advisory scoring 7 or more on CVSS is a high-risk finding. Its cost to fix is the work to upgrade it and re-test the parts of the system that use it.

Team measures

With p the share of commits made by each author over the 12 months before the audited commit:

Automated accounts are left out. Fewer than ten commits in the period is reported as too little history to judge.

What leaves the server

To look up licences and advisories, the registry, name and version of each open-source package a repository depends on are sent to the public Open Source Insights service. No source code, repository name or customer identity is sent, and the lookup can be switched off. Commit history is read from the repository host with the customer's own credentials.

What the engine does not do

A report is evidence for a conversation, not a substitute for one.

See what a buyer would see in your code

A free preview of one repository shows its risk and cost to fix in Slack.