Source configuration versioned in code
Why it matters
Scraper configurations stored only in the database — targets, rate limits, user-agent strings — can be changed by anyone with database access, bypassing code review and leaving no audit trail. SLSA Build L2 and SSDF PW.4 both require that build and configuration artifacts go through version control. A silent config change that removes rate-limit constraints or adds a scraping-prohibited domain is a legal and operational risk that version control would have caught.
Severity rationale
Low because the immediate data integrity risk is indirect — the gap is a governance control weakness rather than an exploitable vulnerability today.
Remediation
Move base source configuration to a code file in src/config/ so that changes require a pull request and deploy. Dynamic overrides (pause flags, temporary rate-limit adjustments) can remain in the database as long as the canonical configuration lives in code.
// src/config/sources.ts
export const SCRAPER_SOURCES = [
{
id: 'linkedin-search',
baseUrl: 'https://linkedin.com/search',
rateLimitMs: 2000,
robotsTxtEnforced: true,
legalBasis: 'legitimate_interest',
},
] as const
Load this array at startup and merge with any database overrides; the code definition always wins for security-sensitive fields like robotsTxtEnforced.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Data Sourcing & Provenance Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- slsa:1.0 · Build L2 — Scripted, versioned build — configuration in version control
- ssdf:800-218 · PW.4 — Reuse existing, well-secured software
Taxons
History
- 2026-04-18·v1.0.0·Initial import from data-sourcing-provenance·automated