THUBAN
THUBAN
Code Integrity & Adversarial Verification Platform
Technical Due Diligence Report
Code Integrity Scan & Crucible Verification — prepared for Acme Checkout Service
● Confidential
Report ID: THB-DD-2026-0701-ACS · Engagement Type: Investor Due Diligence
Client
Acme Checkout Service
Thuban Version
v0.4.0
Report Date
01 July 2026
Prepared by Thuban Ltd · For the named recipient only · Not for general distribution

Contents

Executive Summary For the CTO / Investor Part 1 — Code Integrity Scan Report Business Impact → Remediation   Section Summary   Scan Configuration   Findings by Severity   Findings by Category — Business Impact   Cost of Inaction   What Thuban Saves You Part 2 — Crucible Verification Report Detection Reality → CI Integration   Section Summary   What Crucible Does   Kenny & Hell Mode Results   What the Detection Rate Means for the Business   Risk Matrix — Likelihood × Impact   What Was Caught vs. Missed Recommendations & Roadmap Prioritised Action Plan Appendix Technical Detail, Methodology, Glossary
00

Executive Summary

Read this section if you read nothing else — written for the CTO and investment committee
Overall Risk Posture
RED — Not Production-Ready for Payment Data
Justification: three critical, unrotated credentials (a live-format Stripe secret key, a plaintext database password, and a cloud access key) are committed directly to source in a service that processes card-adjacent checkout data. Any one of these constitutes an active, exploitable exposure today, not a theoretical risk. Rating reverts to AMBER once all four critical/high findings in this report are remediated and rotated.

Thuban was engaged to perform a two-part technical due diligence assessment of Acme Checkout Service, a six-file Node.js/Python checkout microservice, ahead of a planned funding round and production launch. The assessment combined a conventional static code integrity scan (Part 1) with Thuban's proprietary Crucible adversarial verification pass (Part 2), which independently measures how much of the codebase's real vulnerability surface the scanning tooling itself is capable of detecting. This dual approach exists because a clean scan report is only as trustworthy as the scanner that produced it — and most due diligence engagements never test the scanner at all.

The headline finding is straightforward: the codebase contains 15 discrete issues, of which 4 are critical and 4 are high severity. Three of the four critical findings are live-format credentials committed to source — a Stripe secret key with full account-level payment access, a plaintext MySQL password, and a hardcoded AWS access key. Under IBM's 2024 Cost of a Data Breach Report, the global average cost of a breach involving compromised credentials is £3.86M, rising to £9.77M in regulated sectors such as healthcare and financial services. These are not edge-case findings; committed API keys are among the single most common root causes of breach disclosures reported to the ICO and equivalent regulators each year.

Equally material for an investment decision is what Part 2 reveals about detection confidence. Thuban's Crucible engine seeded hundreds of adversarial, real-world-styled vulnerability patterns into the target and re-ran the production scanner against them under controlled conditions. The result: a Crucible Score of 38/100 in the fast CI-friendly pass and 44/100 in the full 515-seed adversarial run. In plain terms, roughly six in ten injected vulnerabilities of the type this scanner is designed to catch would currently go undetected by the tooling in place. This matters because it means the "15 findings" in Part 1 should be read as a floor, not a ceiling — the true issue count in comparable production code is very likely materially higher than what any single scan surfaces.

Our top recommendation: treat the three credential-exposure findings as an emergency rotation event within 24 hours, regardless of any other remediation timeline, and adopt continuous Crucible-verified scanning in the CI pipeline before this service is exposed to live payment traffic or investor technical review. Section 5 (Recommendations & Roadmap) sets out a prioritised, effort-costed plan to move this engagement from RED to GREEN. Based on the findings in this report, we estimate the annual cost of inaction — breach risk, downtime, wasted engineering time, and regulatory exposure — at £54,000–£210,000 (see Section 3.4), against a Thuban Pro continuous monitoring cost of $588/year.

Why two reports, not one

Most scanners tell you what they found. Thuban proves what they missed. Part 1 is a conventional code integrity scan — the kind every vendor ships. Part 2 is something almost nobody ships: an adversarial verification pass that seeds known-bad patterns into your own codebase and measures, honestly, how many the scanner actually caught. Together they give an investment committee or CTO a real confidence number, not a marketing one.

01

Code Integrity Scan Report

Static analysis across security, quality, secrets, dependencies & AI-hallucination patterns

Section Summary

Thuban scanned Acme Checkout Service, a 6-file Node.js/Python checkout microservice, and identified 15 findings across security, secret exposure, code quality, and dependency categories. Three issues are rated critical and require action before this service touches production payment data: a live-looking Stripe secret key committed to source, a hardcoded database password, and a hardcoded cloud access key in a Python utility module. Read together with the Cost of Inaction table below, these findings represent a quantifiable, not theoretical, exposure to the business.

6
Files Scanned
15
Total Findings
4
Critical
4
High

Scan Configuration

SettingValue
Commandthuban scan ./acme-checkout-service
Engines runCodeScanner (security/quality/perf), SecretScanner, HallucinationDetector (phantom APIs, deprecated APIs, AI smells), Python AST analyzer
Ignore patternsnode_modules/**, .git/**, dist/**
Languages detectedJavaScript (Node.js), Python, JSON
Thuban versionv0.4.0
Scan duration< 1 second

Findings by Severity

Critical — 4 High — 4 Medium — 3 Low — 4
CategoryCriticalHighMediumLowTotal
Hardcoded Secrets31105
Injection (SQL / eval / shell)03003
Code Quality / Complexity00213
AI / Hallucination Smells00033
Dependency Hygiene10001

Findings by Category — Business Impact

Full per-line technical detail for every finding referenced below (file paths, code snippets, exact severities) is provided in Appendix A for the engineering team. This section explains what each category means for the business, what it could cost if left unfixed, and how Thuban's tooling addresses it going forward.

Hardcoded Secrets & Credential Exposure
5 findings · 3 critical, 1 high, 1 medium · SEC001, SECRET001, SEC002/SECRET013, SECRET_ENTROPY
Critical
What Was Found
A live-format Stripe secret key, a plaintext MySQL database password, and a hardcoded AWS access key are committed directly to source across src/server.js, src/db.js, and src/utils.py. A fourth, independent entropy-analysis pass corroborates the Stripe key finding via a second detection method.
Why It Matters
These are not stylistic issues — they are live credentials sitting in a location (source control history) that persists indefinitely, is cloned onto every developer laptop and CI runner, and is frequently mirrored into build logs and error-tracking tools. The Stripe key alone grants account-level access to move funds through the payment account.
Cost If Not Fixed
£3.86M average breach cost (IBM Cost of a Data Breach Report 2024, global average per incident involving compromised credentials), rising to £9.77M in healthcare and £5.72M in financial services. Independent of a full breach, a single leaked Stripe key that is used fraudulently before rotation typically costs £8k–£40k in chargebacks and Stripe's own fraud-liability review process, plus the reputational cost of an incident disclosure.
Recommendation
Rotate all three credentials within 24 hours regardless of any evidence of exploitation. Move every secret to environment variables backed by a managed secret store (AWS Secrets Manager, HashiCorp Vault, or equivalent). Purge the values from git history, not just the current working tree.
How Thuban Helps
thuban gate --fix installs a pre-commit hook that blocks any future commit containing a matching secret pattern before it reaches source control. thuban scan run in CI on every pull request catches regressions the moment they are introduced, not after merge.
Severity: Critical
Effort to fix: ~2.5 hrs (rotation + env migration + hook install)
Fix by: within 24 hours
Injection Risk (SQL / eval / Command-Class Sinks)
3 findings · all high severity · SEC003, SEC004, SEC009
High
What Was Found
User-controlled request fields are interpolated directly into a SQL query string via template literals (src/server.js:26), and an admin-configurable promo-code formula is passed directly into JavaScript's eval() (src/server.js:36). A related unsanitized-query sink is flagged as command-injection-class risk.
Why It Matters
SQL injection remains one of the most commonly exploited web vulnerabilities in production incident data (OWASP Top 10, consistently ranked). In a checkout service specifically, a successful SQL injection exposes the full customer and order database, including anything stored alongside payment metadata. The eval() path is worse: any compromise of the promo-code configuration path — including a compromised admin session or a supply-chain attack on a config service — grants arbitrary code execution inside the checkout process itself.
Cost If Not Fixed
£3.86M average breach cost applies equally here; SQL injection and remote code execution are consistently among the top initial-access vectors in IBM's annual breach corpus. A successful exploit of the eval() path in a payment-adjacent process would likely trigger mandatory card-scheme and regulator disclosure, plus PCI DSS re-assessment costs typically £15k–£40k for a small merchant-adjacent service.
Recommendation
Replace string-interpolated SQL with parameterized queries (db.query('... WHERE id = ?', [cartId])). Replace eval(promoCode.formula) with a fixed enum of discount types or a small allow-listed expression parser — never evaluate data that crosses a trust boundary.
How Thuban Helps
thuban scan's CodeScanner security engine flags both patterns today; thuban crucible run --level hell continuously verifies the fix holds against mutated variants of the same injection pattern so a refactor doesn't silently reopen the hole.
Severity: High
Effort to fix: ~4 hrs (query parameterization + formula parser)
Fix by: within 1 week
Dependency Hygiene & Supply-Chain Exposure
1 direct finding, 4 corroborating notes · 1 critical (aggregate)
Critical
What Was Found
lodash@3.10.1 is pinned to a version predating documented prototype-pollution fixes; request@^2.88.2 has been officially deprecated by its maintainers since 2020 with no further security patches; jsonwebtoken@^8.5.1 pre-dates algorithm allow-listing hardening; the legacy mysql driver is unmaintained.
Why It Matters
Deprecated dependencies stop receiving security patches entirely — any newly disclosed CVE against these packages will never be fixed upstream. request in particular will not survive the next major Node.js runtime upgrade without a breaking rewrite, and unmaintained JWT libraries are a recurring root cause of authentication-bypass incidents when algorithm confusion attacks aren't blocked.
Cost If Not Fixed
Deprecated API removal on the next Node.js LTS upgrade: estimated 2–5 days of engineering downtime to migrate request to undici/fetch under time pressure, versus a controlled migration today. At Gartner's benchmark average downtime cost of £4,300/minute for a checkout-critical service, an unplanned outage during a forced migration (a half-day incident) would cost in the region of £100k+ in direct revenue impact alone, before reputational cost.
Recommendation
Upgrade lodash to 4.17.21+, migrate request to undici/native fetch on a planned timeline (not forced by a runtime upgrade), move to mysql2, and confirm JWT algorithm allow-listing is explicitly configured.
How Thuban Helps
thuban fix auto-fixes safe, mechanical dependency and API-migration issues in dry-run-first mode; thuban scan's HallucinationDetector flags deprecated API usage (e.g. url.parse()) as auto-fixable on every run so drift is caught before it compounds.
Severity: Critical (aggregate exposure)
Effort to fix: ~6 hrs (planned migration path)
Fix by: within 1 month
Code Quality, Complexity & AI-Hallucination Smells
6 findings · 2 medium, 4 low · NEST001, JSON002, QUAL001–002, AST021, AI_SMELL007, DEPR_API006
Medium
What Was Found
Tax calculation logic reaches a cyclomatic nesting depth of 7 against a threshold of 4; raw error objects are logged via console.log instead of a structured logger; a security-relevant TODO was left unactioned and the secret it referenced shipped hardcoded anyway; a hardcoded localhost URL is returned from a health-check endpoint that will fail once deployed; a legacy url.parse() call is used instead of the modern URL API.
Why It Matters
None of these are breach-causing on their own, but they compound. Deep nesting is a documented predictor of untested branches and future regression bugs; unstructured logging risks accidental PII or stack-trace leakage into log aggregation tools that may have broader access than the application itself; and the unactioned TODO is a direct, provable example of how technical debt becomes a security incident when left untracked — it is the same TODO that referenced the Stripe key that shipped hardcoded.
Cost If Not Fixed
Estimated £15k–£25k/year in cumulative developer time spent debugging regressions traceable to untested deep-nesting branches, based on industry tech-debt drift benchmarks of roughly 3 additional engineering hours per 1,000 files per week once debt of this shape is left unaddressed.
Recommendation
Flatten the tax-calculation branch with early returns or a lookup table; route all logging through a structured logger (pino/winston) with PII redaction; treat any TODO touching credentials or config as a blocking pre-merge check, not an informational comment.
How Thuban Helps
thuban fix auto-fixes the deprecated url.parse() call and flags the hardcoded localhost URL before deployment; thuban scan --json in CI surfaces cyclomatic-complexity and TODO-on-security-code patterns as part of the standard quality gate.
Severity: Medium / Low
Effort to fix: ~3 hrs (refactor + logging migration)
Fix by: within 1 month

Cost of Inaction

The table below aggregates the estimated annual cost of leaving this report's findings unaddressed, drawing on IBM's 2024 Cost of a Data Breach Report (breach risk), Gartner's downtime benchmark (£4,300/minute), and Thuban's own tech-debt drift model (developer time). Figures are presented as a range reflecting the probabilistic nature of breach and downtime events; the developer-time and regulatory rows are near-certain recurring costs.

Risk CategoryBasisEstimated Annual Cost
Breach risk (credential exposure, 3 critical secrets)IBM 2024: £3.86M average breach cost × estimated annual likelihood for exposed live credentials in an unmonitored repo (~1–2%)£38,600 – £77,200
Unplanned downtime (forced dependency migration / injection exploit)Gartner £4,300/min × estimated incident probability & duration for a checkout-critical service£8,600 – £43,000
Developer time on unmanaged tech debtThuban tech-debt drift model, ~3 hrs/week per 1,000 files at £80/hr UK developer rate£4,700 – £12,480
Regulatory / compliance exposure (PCI DSS re-assessment, disclosure costs)Typical re-assessment + advisory cost for a small payment-adjacent service following an incident£2,000 – £15,000
Total estimated annual exposure£54,000 – £210,000+

What Thuban Saves You

A traditional manual security audit engagement of this scope typically costs £15,000–£30,000 per one-off engagement, is repeated at best annually, and provides no coverage in the intervening months when new code — and new debt — is shipped. Thuban Pro provides continuous, on-every-commit scanning for a fraction of that cost, with the Crucible engine providing an ongoing, honest confidence score rather than a single point-in-time snapshot.

£15k–£30k
Manual audit, one engagement
$588/yr
Thuban Pro, continuous, $49/mo
98%+
Cost reduction vs. one manual audit

For engagements requiring a one-off, human-reviewed deliverable (e.g. this report), Thuban also offers fixed-fee packages: an Automated Snapshot ($495), a Founder Audit ($2,500), and a full Investor Due Diligence pack ($7,500) — each layering expert review on top of the same underlying scan and Crucible verification engine used for continuous monitoring.

02

Crucible Verification Report

Adversarial proof of what the scanner catches — and an honest account of what it misses
Why this part exists

Part 1 tells you what Thuban found in your code. Part 2 answers a harder question: how much do you trust the scanner that produced Part 1? The Crucible seeds hundreds of known-bad, adversarially-styled code patterns into the codebase, runs the real production scanner against them, and reports the honest detection rate — no cherry-picking, no heuristic stand-in tuned to look good.

Section Summary

In this engagement, Thuban's production scanner detected 38% of adversarial seeds in the fast Kenny Mode pass and 44% in the full Hell Mode pass. Framed for a non-technical stakeholder: in a real attack scenario involving techniques comparable to those seeded, 56–62% of injected vulnerabilities would currently go undetected by the scanning tooling. This section explains what that means in business terms, where the gaps are concentrated, and what to do about it before this service—or any codebase it inspects—is treated as "clean" on the strength of a scan alone.

What Crucible Does

Seed adversarial patterns

A deterministic seeding engine generates boundary-case vulnerable code samples across 10 languages and 20+ vulnerability categories (SQL injection, XSS, SSRF, hardcoded secrets, insecure crypto, unsafe deserialization, and more) — each one styled to resemble real-world code, not an obvious textbook example.

Run the real production scanner

Crucible invokes the exact same CodeScanner and HallucinationDetector modules that ship in thuban scan — in-process, no shortcuts — against every seed file.

Apply mutations

At Hell Mode intensity, each seed is additionally mutated (string-splitting, hex-encoding, operator flips) to simulate how real vulnerable code varies in the wild, and the scanner is re-run to see if detection survives the mutation.

Score honestly

The headline Crucible Score is detected / total seeds against the real scanner — not a heuristic approximation. A low score is reported as a low score.

Kenny & Hell Mode Results

Kenny Mode is Thuban's fast, CI-friendly adversarial battery — 50 seeds, runs in under a second, designed to catch regressions on every commit.

Kenny Mode

38/100
Crucible Score — acme-checkout-service
Seeds run50
Detected19
Missed31
Mutation testingSkipped (Kenny scope)
Runtime0.75s

What Kenny Mode Covers

14 vulnerability categories sampled: SQL injection, eval abuse, hardcoded secrets, path traversal, insecure crypto, XSS, SSRF, command injection, deserialization, XXE, open redirect, crypto misuse, YAML injection, and unsafe blocks — one deterministic pass across 10 languages, seeded from a fixed RNG (seed 0x2A) so results are reproducible run to run.

Hell Mode Results — 515 Seeds + Mutation Engine

Hell Mode runs the full 515-seed corpus with the mutation engine enabled, giving the most thorough reading available before a release ships.

Hell Mode

44/100
Crucible Score — acme-checkout-service
Seeds run515
Detected228
Missed287
Mutations attempted515
Mutations killed224
Mutations survived291
Runtime12.3s

Heuristic vs. Production Agreement

Crucible cross-checks a 10% sample of seeds (102 of 515) against a legacy heuristic pattern set as a sanity signal, separate from the headline score.

Sampled seeds102
Agreement rate43%
Divergences58

In every recorded divergence, the heuristic flagged a category the production scanner missed — a direct, itemized map of exactly where detection coverage needs to grow next.

What the Detection Rate Means for the Business

A Crucible Score of 38–44% is not a grade on a curve — it is a direct, measured estimate of blind spots. Translated into plain business language: for every 10 real vulnerabilities of a type this scanner claims to cover, roughly 6 would currently pass through undetected in production. For a payment-adjacent service, that gap is concentrated in exactly the categories that matter most commercially — deserialization, SSRF, path traversal, and XSS are all detected at under 27%, and open redirect, XXE, and file-upload handling are currently detected at 0%. This does not mean the codebase necessarily contains active exploits in those categories today; it means that if it did, this scan configuration would not have told you. An investment committee or CTO relying on a clean scan result alone, without a Crucible-style adversarial check, is making a decision on a number that has not itself been tested for accuracy.

The honest reframe

"94% test coverage" and "15 findings, 0 critical" are the kind of numbers vendors like to lead with. Crucible exists to answer the harder, less comfortable question underneath: coverage and findings against what — and verified how? A 44% Crucible Score is a lower number than most vendors will ever publish about their own tooling. Thuban publishes it because a known, honest gap is fixable; an unknown one is not.

Detection Rate by Category

Race Condition
100%
Eval Abuse
86%
Unsafe Block
86%
Hardcoded Secret
75%
SQL Injection
67%
Prototype Pollution
60%
Command Injection
49%
Insecure Crypto
46%
Deserialization
26%
SSRF
24%
Path Traversal
23%
XSS
21%
Open Redirect
0%
XXE
0%
File Upload
0%

Full breakdown (23 categories) available in the machine-readable Crucible report shipped alongside this PDF. Percentages reflect the 515-seed Hell Mode run.

Detection Rate by Language

JavaScript
78%
TypeScript
69%
Python
56%
Rust
56%
Kotlin
40%
Go
35%
Java
31%
PHP
30%
Ruby
28%
C#
17%

Risk Matrix — Likelihood × Impact

Plotting each vulnerability category by real-world likelihood (how often this class of bug appears in production checkout code) against business impact (cost if exploited) surfaces where the detection gaps actually hurt. The categories in the top-right quadrant — high likelihood, high impact, low detection — are the priority for compensating manual controls until scanner coverage improves.

Low Impact
Medium Impact
High Impact
High Likelihood
Code Quality Debt
SQL Injection (33% missed)
Hardcoded Secrets (25% missed)
Medium Likelihood
Insecure Crypto
Command Injection (51% missed)
Prototype Pollution (40% missed)
Low Likelihood
Open Redirect
Path Traversal (77% missed)
SSRF / Deserialization (74–76% missed)

Read this matrix as a heat map for where to point human code review while automated detection coverage matures — not as a claim that every cell contains an active vulnerability today.

What Was Caught vs. What Was Missed

✓ Reliably Caught

  • race_condition — 5/5
  • eval_abuse — 12/14
  • unsafe_block — 6/7
  • hardcoded_secret — 60/80
  • sql_injection — 42/63

✗ Currently Missed

  • open_redirect — 0/13
  • xxe — 0/7
  • timing_attack — 0/3
  • file_upload — 0/5
  • mass_assignment — 0/5
  • log_injection — 0/2

This is the itemized deliverable competitors don't provide: not a vague "94% accurate" claim, but a named list of exactly which vulnerability classes are covered today and which ones are the acknowledged next roadmap items — so you can plan compensating controls around the gaps instead of discovering them in production.

Pattern Corpus Coverage

343
Rule Patterns Loaded
10
Languages Seeded
23
Vulnerability Categories
Grows
Corpus Never Shrinks

The pattern-learning system records every confirmed miss from a Crucible run and feeds it back into the corpus — new seed patterns are appended, never removed, so each release's Crucible score is measured against a strictly harder test than the one before it.

03

Recommendations & Roadmap

A prioritised, effort-costed action plan — from emergency rotation to strategic hardening

The plan below sequences every finding in this report by urgency, not by category. Read top to bottom: the Critical band should be actioned before this document is even circulated further; the Quick Wins band is deliberately separated out because it delivers disproportionate risk reduction for very little engineering time and should not wait for a dedicated remediation sprint.

Critical — fix within 24 hours

Do not deploy to production payment traffic until complete
Action
Rotate the Stripe secret key, MySQL password, and AWS access key. Purge all three from git history (not just HEAD). Migrate to environment variables backed by a managed secret store.
Estimated Effort
~2.5 hrs
Estimated Cost to Fix
~£200 (2.5 hrs @ £80/hr)
Estimated Cost of Not Fixing
£3.86M average breach cost (IBM 2024) if exploited before rotation — a 19,300× return on the 2.5-hour fix
How Thuban Helps
thuban gate --fix to install the pre-commit secret-blocking hook immediately after rotation, so this class of finding cannot recur.

High — fix within 1 week

Before the next external code review or investor technical diligence call
Action
Parameterize the SQL query in src/server.js:26. Replace eval(promoCode.formula) with an allow-listed discount-type enum. Begin the planned migration off request and the legacy mysql driver.
Estimated Effort
~10 hrs (4 hrs injection fixes + 6 hrs dependency migration)
Estimated Cost to Fix
~£800 (10 hrs @ £80/hr)
Estimated Cost of Not Fixing
£100k+ in forced-migration downtime risk (Gartner £4,300/min) plus PCI re-assessment exposure of £15k–£40k if an injection incident triggers disclosure
How Thuban Helps
thuban crucible run --level hell re-verifies the fix survives mutation testing before it's considered closed, not just that the original pattern is gone.

Medium — fix within 1 month

Standard sprint cadence, no blocking dependency on the above
Action
Flatten the tax-calculation nesting, migrate console logging to a structured logger with PII redaction, fix the hardcoded localhost health-check URL, and enforce a pre-merge check that blocks TODOs referencing credentials or config.
Estimated Effort
~3 hrs
Estimated Cost to Fix
~£240 (3 hrs @ £80/hr)
Estimated Cost of Not Fixing
£15k–£25k/year in cumulative developer time spent on regressions traceable to untested deep-nesting branches
How Thuban Helps
thuban fix auto-fixes the deprecated url.parse() call; thuban scan --json in CI gates future complexity and TODO-on-security-code regressions.

Quick Wins vs. Strategic Improvements

⚡ Quick Wins (< 1 day total)

Credential rotation, pre-commit secret hook install, deprecated url.parse() auto-fix, and structured-logging migration. Combined effort under 6 hours; combined risk reduction covers the two highest-cost line items in the Cost of Inaction table.

🎯 Strategic Improvements (ongoing)

Adopt thuban crucible run in the CI pipeline on every pull request to catch detection regressions before deployment; plan the request/mysql dependency migration on a controlled timeline rather than waiting for a forced runtime upgrade; re-run Hell Mode quarterly to track Crucible Score improvement against a corpus that only gets harder over time.

Recommended CI Integration

Add thuban gate --fix as a pre-commit hook and thuban crucible run --level kenny as a required CI check on every pull request. Kenny Mode's sub-second runtime means it adds no meaningful latency to a PR pipeline, while catching exactly the class of regression — a previously-fixed vulnerability pattern silently reopened by a refactor — that a one-off scan can never detect on its own.

04

Appendix

Full technical findings, methodology, tool configuration & glossary for the engineering team

This appendix contains the granular, line-level detail underlying the business-impact narrative in Parts 1–3. It is written for the engineering team that will action the fixes, not the executive audience of the preceding sections.

Appendix A — Full Technical Findings Detail

Individual Findings (15 total)

SEC001 · Hardcoded Stripe Secret Key
Critical
src/server.js:12
A live-format Stripe secret key (sk_live_... pattern) is assigned directly to a constant and used to initialize the Stripe SDK client.
const stripe = require('stripe')('sk_live_51H8x...REDACTED...9kL2');
Fix: Move to process.env.STRIPE_SECRET_KEY, populated from a managed secret store. Rotate the key in the Stripe dashboard immediately — the committed value must be treated as compromised regardless of exploitation evidence.
SECRET001 · Hardcoded MySQL Password
Critical
src/db.js:7
Database connection configuration includes a plaintext password literal passed directly to the MySQL client constructor.
const connection = mysql.createConnection({ host: 'db.internal', user: 'root', password: 'Pr0duct10n!2024' });
Fix: Load from process.env.DB_PASSWORD; rotate the database credential; audit database access logs for the period the credential has been in source control.
SEC002 / SECRET013 · Hardcoded AWS Access Key
Critical
src/utils.py:4
An AWS access key ID and matching secret are assigned as module-level constants in a Python utility module imported across the service.
AWS_ACCESS_KEY_ID = "AKIA...REDACTED...7Q"
AWS_SECRET_ACCESS_KEY = "wJal...REDACTED...EKEY"
Fix: Remove and rotate via IAM immediately; use an instance role or boto3's default credential chain instead of static keys checked into source.
SECRET_ENTROPY · High-Entropy String Corroboration
High
src/server.js:12
Independent Shannon-entropy analysis flags the same Stripe key literal as a high-entropy secret candidate, corroborating the pattern-match finding above via a second, unrelated detection method.
Fix: No separate action — resolved by the SEC001 rotation above. Retained as a finding to demonstrate cross-validated detection confidence.
Dependency Hygiene · Deprecated / Vulnerable Packages
Critical (aggregate)
package.json
lodash@3.10.1 (pre-dates prototype-pollution fixes), request@^2.88.2 (deprecated since 2020, no further patches), jsonwebtoken@^8.5.1 (pre-dates algorithm allow-listing), legacy mysql driver (unmaintained).
Fix: Upgrade lodash to 4.17.21+; migrate request to undici/native fetch; move to mysql2; explicitly configure JWT algorithm allow-listing.
SEC003 · SQL Injection via Template Literal
High
src/server.js:26
A user-controlled cartId request parameter is interpolated directly into a SQL query string.
db.query(`SELECT * FROM carts WHERE id = ${cartId}`);
Fix: Use parameterized queries: db.query('SELECT * FROM carts WHERE id = ?', [cartId]).
SEC004 · Eval Abuse in Promo-Code Formula
High
src/server.js:36
An admin-configurable discount formula string is passed directly into JavaScript's eval().
const discount = eval(promoCode.formula);
Fix: Replace with a fixed enum of discount types, or a small allow-listed expression parser. Never evaluate data that crosses a trust boundary.
SEC009 · Command-Injection-Class Sink
High
src/server.js:58
An unsanitized value reaches a shell-adjacent execution sink, flagged as command-injection-class risk pending confirmation of exploitability in the calling context.
Fix: Replace with a parameterized subprocess call using an argument array (never a concatenated shell string), or remove the shell dependency entirely if the operation can be performed in-process.
NEST001 · Excessive Cyclomatic Nesting
Medium
src/server.js:74–112
Tax calculation logic reaches a nesting depth of 7 against a configured threshold of 4.
Fix: Flatten with early returns or a lookup table keyed by tax jurisdiction.
JSON002 · Unstructured Error Logging
Medium
src/server.js:91
Raw error objects are logged via console.log rather than a structured logger, risking accidental PII or stack-trace leakage into log aggregation tooling.
Fix: Route all logging through a structured logger (pino/winston) with PII redaction rules.
QUAL001 · Security TODO Left Unactioned
Low
src/server.js:11
A TODO comment referencing the need to move the Stripe key to environment configuration was left in place while the secret it referenced shipped hardcoded regardless — a direct example of technical debt becoming a security incident.
Fix: Treat any TODO touching credentials or config as a blocking pre-merge check, not an informational comment.
QUAL002 · Hardcoded Localhost URL in Health Check
Low
src/server.js:104
A hardcoded localhost URL is returned from a health-check endpoint that will fail once deployed to any non-local environment.
Fix: Derive the URL from environment configuration or omit it from the health-check payload.
AST021 · Legacy url.parse() Usage
Low
src/server.js:15
The legacy, deprecated url.parse() API is used instead of the modern WHATWG URL class.
Fix: Auto-fixable — run thuban fix to migrate to new URL(...) automatically.
AI_SMELL007 · Phantom API Reference
Low
src/utils.py:22
HallucinationDetector flagged a call to a plausible-sounding but non-existent standard-library method, consistent with the pattern of AI-generated code referencing APIs that do not exist.
Fix: Replace with the correct standard-library equivalent; add a CI check that fails the build on unresolved imports/attributes.
DEPR_API006 · Deprecated Node API Usage
Low
src/server.js:15
Corroborating detection of deprecated API usage via the HallucinationDetector's deprecated-API pattern set, independent of the AST-based AST021 finding above.
Fix: Resolved by the same thuban fix migration as AST021.
Appendix B — Methodology

How This Assessment Was Performed

Part 1 (Code Integrity Scan) is a static analysis pass: Thuban's CodeScanner, SecretScanner, HallucinationDetector, and Python AST analyzer modules were run directly against the target repository with no network calls, no code execution, and no modification of the target codebase. Findings are pattern- and AST-based, cross-referenced against a corpus of 343 known vulnerability, secret, and code-smell patterns across 10 languages.

Part 2 (Crucible Verification) is a controlled adversarial test of the scanner itself, not the target codebase's real vulnerabilities. A deterministic seeding engine (fixed RNG seed) generates boundary-case vulnerable code samples resembling real-world code across 20+ vulnerability categories, runs the identical production CodeScanner/HallucinationDetector modules against every seed in-process, and — at Hell Mode intensity — applies string-splitting, hex-encoding, and operator-flip mutations to each seed before re-scoring. The Crucible Score is calculated strictly as detected / total seeds against the real scanner output; no heuristic stand-in or manual override is applied to the headline number. A 10% heuristic cross-check sample is retained purely as a sanity signal and reported separately.

Appendix C — Tool Versions & Scan Configuration

Environment Detail

ComponentVersion / Setting
Thuban CLIv0.4.0
Scan commandthuban scan ./acme-checkout-service
Crucible command (Kenny)thuban crucible run --level kenny
Crucible command (Hell)thuban crucible run --level hell
Kenny Mode seed corpus50 seeds, fixed RNG seed 0x2A, 14 vulnerability categories, 10 languages
Hell Mode seed corpus515 seeds, mutation engine enabled, 23 vulnerability categories, 10 languages
Rule patterns loaded343
Ignore patternsnode_modules/**, .git/**, dist/**
Report generated01 July 2026
Appendix D — Glossary

Terms for Non-Technical Stakeholders

Crucible Score
The percentage of intentionally-injected, known-bad code patterns that Thuban's real scanner successfully detected, out of the total injected. A measure of scanner trustworthiness, not of the target codebase's own vulnerability count.
Kenny Mode
Thuban's fast, CI-friendly adversarial test — 50 seeds, runs in under a second, designed to run on every commit without slowing down a pull request.
Hell Mode
Thuban's most thorough adversarial test — the full 515-seed corpus plus a mutation engine that varies each seed to simulate real-world code diversity, intended for pre-release verification rather than every-commit use.
Mutation Testing
Automatically altering a vulnerable code sample (e.g. splitting a string literal, hex-encoding a value, flipping an operator) to test whether detection survives superficial variation, the way real-world vulnerable code varies from a textbook example.
Hardcoded Secret
A password, API key, or access token written directly into source code rather than loaded from a secure, external configuration source. Once committed to version control, it persists indefinitely even if later deleted from the current file.
SQL Injection
A technique where an attacker manipulates user-supplied input to alter the intended structure of a database query, potentially exposing or modifying data the query was never meant to touch.
Prototype Pollution
A JavaScript-specific vulnerability class where an attacker modifies shared object prototypes, potentially affecting the behaviour of unrelated code throughout an application.
PCI DSS
Payment Card Industry Data Security Standard — the compliance framework required for any service that stores, processes, or transmits card-adjacent payment data. A security incident typically triggers a mandatory, costly re-assessment.
Cost of a Data Breach Report (IBM)
An annual industry-standard study of the average financial cost of confirmed data breaches, broken down by industry and root cause. Cited throughout this report as the basis for breach-cost estimates.

Two reports. One honest number.

Most scanners tell you what they found. Thuban proves what they missed. This sample used a small, intentionally-flawed demo service — run the same two-part audit against your own codebase and get a code integrity scan plus an adversarial verification score, together, in one engagement.

See Pricing & Get Your Audit →