mirror of
https://github.com/elicpeter/nyx.git
synced 2026-07-03 20:41:00 +02:00
Dynamic (#77)
This commit is contained in:
parent
55247b7fcd
commit
991c84a1eb
1464 changed files with 225448 additions and 1985 deletions
16
tests/dynamic_fixtures/stubs_e2e/c/sql/vuln/main.c.fragment
Normal file
16
tests/dynamic_fixtures/stubs_e2e/c/sql/vuln/main.c.fragment
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/* Phase 10 (Track D.3) — C SQL recorder body-only fragment.
|
||||
*
|
||||
* Wrapped at test time by `wrap_c_fragment(body, shim)` in
|
||||
* `tests/stubs_e2e_per_lang.rs`: the wrapper prepends the C probe
|
||||
* shim (which carries `__nyx_stub_sql_record`) and a `main()` shell
|
||||
* so `cc <source>.c -o <bin> && ./<bin>` builds the program in place.
|
||||
*
|
||||
* The fixture surfaces the attempted tautology query through the
|
||||
* shim recorder so the host-side SqlStub captures it as
|
||||
* `driver = "manual"` — no libsqlite3-dev / sqlite3.h dependency on
|
||||
* the dynamic CI matrix.
|
||||
*/
|
||||
const char *query = "SELECT 1 WHERE 'a' = 'a' OR 1=1 --";
|
||||
const char *detail_keys[] = { "driver" };
|
||||
const char *detail_vals[] = { "manual" };
|
||||
__nyx_stub_sql_record(query, detail_keys, detail_vals, 1);
|
||||
Loading…
Add table
Add a link
Reference in a new issue