mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-15 20:05:13 +02:00
[pitboss/grind] deferred session-0001 (20260522T163126Z-7d60)
This commit is contained in:
parent
fd50549582
commit
e4258d63ed
7 changed files with 625 additions and 13 deletions
|
|
@ -128,7 +128,9 @@ mod e2e_json_parse_depth {
|
|||
.join("tests/dynamic_fixtures/json_parse_depth")
|
||||
.join(match lang {
|
||||
Lang::Python => "python",
|
||||
_ => unreachable!("JSON_PARSE depth e2e covers Python only"),
|
||||
Lang::JavaScript => "javascript",
|
||||
Lang::Ruby => "ruby",
|
||||
_ => unreachable!("JSON_PARSE depth e2e covers Python + JavaScript + Ruby only"),
|
||||
})
|
||||
.join(fixture);
|
||||
let tmp = TempDir::new().expect("create tempdir");
|
||||
|
|
@ -167,8 +169,14 @@ mod e2e_json_parse_depth {
|
|||
}
|
||||
|
||||
fn run(lang: Lang, fixture: &str, entry_name: &str) -> Option<RunOutcome> {
|
||||
if !command_available("python3") {
|
||||
eprintln!("SKIP {lang:?} {fixture}: missing toolchain python3");
|
||||
let required = match lang {
|
||||
Lang::Python => "python3",
|
||||
Lang::JavaScript => "node",
|
||||
Lang::Ruby => "ruby",
|
||||
_ => unreachable!("JSON_PARSE depth e2e covers Python + JavaScript + Ruby only"),
|
||||
};
|
||||
if !command_available(required) {
|
||||
eprintln!("SKIP {lang:?} {fixture}: missing toolchain {required}");
|
||||
return None;
|
||||
}
|
||||
let _guard = FIXTURE_LOCK.lock().unwrap_or_else(|e| e.into_inner());
|
||||
|
|
@ -208,6 +216,22 @@ mod e2e_json_parse_depth {
|
|||
};
|
||||
assert_confirmed(Lang::Python, &outcome);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn javascript_vuln_confirms_via_run_spec() {
|
||||
let Some(outcome) = run(Lang::JavaScript, "vuln.js", "run") else {
|
||||
return;
|
||||
};
|
||||
assert_confirmed(Lang::JavaScript, &outcome);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ruby_vuln_confirms_via_run_spec() {
|
||||
let Some(outcome) = run(Lang::Ruby, "vuln.rb", "run") else {
|
||||
return;
|
||||
};
|
||||
assert_confirmed(Lang::Ruby, &outcome);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue