Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions bench/tasks/c-system-non-constant/answer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
issues:
- id: c-system-var-001
file: exec.c
severity: HIGH
cwe: CWE-78
vulnSlugs: [c-system-non-constant, command-injection]
location: { startLine: 4, endLine: 4, tolerance: 2 }
scanner: { mustEmitCandidate: true }
- id: c-system-concat-001
file: exec.c
severity: HIGH
cwe: CWE-78
vulnSlugs: [c-system-non-constant, command-injection]
location: { startLine: 9, endLine: 9, tolerance: 2 }
scanner: { mustEmitCandidate: true }
- id: c-system-var-002
file: exec.c
severity: HIGH
cwe: CWE-78
vulnSlugs: [c-system-non-constant, command-injection]
location: { startLine: 11, endLine: 11, tolerance: 2 }
scanner: { mustEmitCandidate: true }
decoys:
- id: c-system-literal-decoy
file: exec.c
line: 15
forbiddenSlugs: [c-system-non-constant]
16 changes: 16 additions & 0 deletions bench/tasks/c-system-non-constant/source/exec.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <stdlib.h>

int run_vulnerable_var(const char *cmd) {
return system(cmd);
}

int run_vulnerable_concat(const char *path) {
char buf[256];
int n = system("rm -- " + 0);
(void)buf; (void)path; (void)n;
return system(path);
}

int run_safe(void) {
return system("ls -la /tmp");
}
9 changes: 9 additions & 0 deletions bench/tasks/c-system-non-constant/task.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[provenance]
source = "handcraft"
added_at = "2026-05-14"
reviewer = "@noeljackson"
review_due = "2027-05-14"
notes = "C system() / popen() with non-literal argument — command injection."

[labels]
change_rule = "freeze"
20 changes: 20 additions & 0 deletions bench/tasks/java-ssrf-resttemplate/answer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
issues:
- id: java-ssrf-resttemplate-001
file: ProxyService.java
severity: HIGH
cwe: CWE-918
vulnSlugs: [java-ssrf-resttemplate, ssrf]
location: { startLine: 9, endLine: 9, tolerance: 2 }
scanner: { mustEmitCandidate: true }
- id: java-ssrf-webclient-001
file: ProxyService.java
severity: HIGH
cwe: CWE-918
vulnSlugs: [java-ssrf-resttemplate, ssrf]
location: { startLine: 13, endLine: 13, tolerance: 2 }
scanner: { mustEmitCandidate: true }
decoys:
- id: java-non-http-decoy
file: ProxyService.java
line: 20
forbiddenSlugs: [java-ssrf-resttemplate]
23 changes: 23 additions & 0 deletions bench/tasks/java-ssrf-resttemplate/source/ProxyService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.example.proxy;

import org.springframework.web.client.RestTemplate;
import org.springframework.web.reactive.function.client.WebClient;

public class ProxyService {

public String fetchVulnerable(String url) {
return new RestTemplate().getForObject(url, String.class);
}

public String fetchWebClientVulnerable(String url) {
return WebClient.create().get().uri(url).retrieve().bodyToMono(String.class).block();
}

public String fetchHealthSafe() {
return "internal:status:ok";
}

public String renderName(String name) {
return "Hello, " + name;
}
}
7 changes: 7 additions & 0 deletions bench/tasks/java-ssrf-resttemplate/source/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>ssrf-fixture</artifactId>
<version>0.0.1</version>
</project>
9 changes: 9 additions & 0 deletions bench/tasks/java-ssrf-resttemplate/task.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[provenance]
source = "handcraft"
added_at = "2026-05-14"
reviewer = "@noeljackson"
review_due = "2027-05-14"
notes = "Java RestTemplate / WebClient making outbound HTTP to a URL built from input (SSRF)."

[labels]
change_rule = "freeze"
20 changes: 20 additions & 0 deletions bench/tasks/rust-mem-transmute/answer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
issues:
- id: rust-mem-transmute-001
file: src/lib.rs
severity: MEDIUM
cwe: CWE-704
vulnSlugs: [rust-mem-transmute]
location: { startLine: 4, endLine: 4, tolerance: 2 }
scanner: { mustEmitCandidate: true }
- id: rust-mem-transmute-002
file: src/lib.rs
severity: MEDIUM
cwe: CWE-704
vulnSlugs: [rust-mem-transmute]
location: { startLine: 8, endLine: 8, tolerance: 2 }
scanner: { mustEmitCandidate: true }
decoys:
- id: rust-from-bits-safe-decoy
file: src/lib.rs
line: 12
forbiddenSlugs: [rust-mem-transmute]
4 changes: 4 additions & 0 deletions bench/tasks/rust-mem-transmute/source/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[package]
name = "fixture"
version = "0.0.1"
edition = "2021"
13 changes: 13 additions & 0 deletions bench/tasks/rust-mem-transmute/source/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use std::mem;

pub fn reinterpret_bits_vulnerable(x: u64) -> f64 {
unsafe { mem::transmute(x) }
}

pub fn reinterpret_std_vulnerable(x: i32) -> u32 {
unsafe { std::mem::transmute(x) }
}

pub fn convert_safe(x: u64) -> f64 {
f64::from_bits(x)
}
9 changes: 9 additions & 0 deletions bench/tasks/rust-mem-transmute/task.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[provenance]
source = "handcraft"
added_at = "2026-05-14"
reviewer = "@noeljackson"
review_due = "2027-05-14"
notes = "Rust mem::transmute call — manual unsoundness review warranted."

[labels]
change_rule = "freeze"
Loading