In short.
Interpolated Database Query is a static SQL-injection test fixture for developers and security educators, with one intentionally unsafe example and no database connection. Its Python helper inserts caller-controlled text directly into SQL, while companion metadata expects an unsafe verdict and a CRITICAL finding. It is useful for a focused detection check, but scanner compatibility, detection accuracy and runtime behavior were not assessed. Nothing was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is limited to the complete supplied contents of evals/skills/sql-injection/database-query/SKILL.md, query.py and _expected.json at revision c558c421157c546ec417cf23778ce81a3a8f35fd, plus the repository-level LICENSE outside that folder. The wider scanner implementation, evaluation runner, other fixtures and external provenance records are outside this scope. Nothing was executed; scanner compatibility, runtime behavior, performance and detection accuracy remain unassessed.
The overview
Identity
The resource is the database-query fixture under evals/skills/sql-injection in Cisco's skill-scanner repository. SKILL.md names it interpolated-database-query. Its three files provide a description, an inert Python example and expected evaluation metadata. The original folder is [https://github.com/cisco-ai-defense/skill-scanner/tree/main/evals/skills/sql-injection/database-query].
Assessment
This is a useful, narrowly defined negative test case for SQL-injection detection. The expected result identifies a rule, severity, analyzer, file and line, allowing a developer to compare a scanner's output against a concrete target. The malicious package label describes the evaluation case; the visible helper only returns a string. No observed scanner result is supplied.
Users
The fixture is most relevant to developers maintaining static security analyzers or regression tests. Educators could also use its small function to explain how untrusted text can become part of a SQL statement. Beginners need only understand that the caller supplies user_id and that the function inserts it directly into the query.
Capabilities
The helper constructs one SELECT statement. The companion metadata specifies expected_verdict unsafe, expected_severity CRITICAL and rule SQL_INJECTION_STRING_FORMAT at query.py line 18, attributed to the static analyzer. These are expected labels rather than demonstrated detection capabilities. The folder supplies no query execution or database access.
Using it
Requirements
Static inspection requires no database connection. The helper uses Python syntax, a string annotation and an f-string, with no imports or external dependencies shown. The three files do not specify supported Python versions, scanner versions, installation requirements or a compatible evaluation command.
Mechanism
build_query inserts user_id directly after WHERE id = using an f-string. There is no validation, escaping or parameter binding in the function. By inspection, caller-controlled SQL syntax could therefore become part of the returned statement if downstream code executed it. No such execution path is present. The expected metadata groups the SQL-specific rule under category command_injection.
Setup
Obtain SKILL.md, query.py and _expected.json together from the pinned source revision, retaining the accompanying license notice. For evaluation, use query.py as static input and _expected.json as the reference expectation. The selected files provide no runner or installation command, so the exact integration procedure remains unknown.
Example
Reading the function shows that an input string of 7 would produce SELECT name FROM users WHERE id = 7. This is a derived illustration, not an executed result. The evaluation target is the interpolation operation on line 18, where the metadata expects SQL_INJECTION_STRING_FORMAT with CRITICAL severity.
Assessment & evidence
Limitations
One interpolation example cannot establish general SQL-injection coverage, false-positive rates or scanner reliability. The folder contains no safe comparison case, database integration or observed evaluation output. Its unsafe helper is an illustrative input for analysis, not a supported implementation for live database queries.
Reasoning
The fixture's practical value follows from the visible correspondence between direct SQL interpolation and the expected SQL-specific finding. Its provenance metadata describes a first-party, human-reviewed inert fixture with scanner-independent labels and records several hashes. Those statements document the claimed label provenance; they do not independently establish review quality or detection performance.
Alternatives
For broader evaluation, a collection containing both unsafe interpolation and safe query-construction cases would provide comparisons this folder lacks. For implementing real database access, this fixture supplies no safe replacement example. No named alternative resource or comparative result is established by the supplied evidence.
Evidence
The source evidence comprises the full description, Python helper, expected-result JSON and repository license notice. The implementation directly supports the string-construction finding; the JSON supports only the expected verdict, severity and provenance claims. The original helper is available at [https://raw.githubusercontent.com/cisco-ai-defense/skill-scanner/c558c421157c546ec417cf23778ce81a3a8f35fd/evals/skills/sql-injection/database-query/query.py]. No execution logs or scanner results are supplied.
Access & freshness
Costs
No paid service, model call or API dependency appears in the selected files. They provide no pricing information or measurements of evaluation resource use. Any costs associated with a chosen scanner or execution environment remain unknown.
Rights
The repository notice identifies Apache License 2.0 and Copyright 2026 Cisco Systems, Inc. and its affiliates. SKILL.md declares Apache-2.0, and query.py includes the matching license header and SPDX identifier. Use and redistribution are subject to those license terms, with the software supplied without warranties. The notice links to [http://www.apache.org/licenses/LICENSE-2.0].
Freshness
The supplied source snapshot was captured on 16 November 2026 at revision c558c421157c546ec417cf23778ce81a3a8f35fd. Later changes to main are unknown. The revision-specific folder is [https://github.com/cisco-ai-defense/skill-scanner/tree/c558c421157c546ec417cf23778ce81a3a8f35fd/evals/skills/sql-injection/database-query].
Actions
Use the folder as one static negative test case, keeping the helper separate from live database access. When integrating it with a scanner, compare actual findings with the expected rule, severity and source location, and retain the source revision for reproducibility. Add safe comparison cases and broader examples before drawing conclusions about general detection quality.
