drift-dataset-codeexec-platform - #22
Open
data-Ja3g3r wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CDK Drift Benchmark Suite — 18 benchmarks across 5 families
Summary
Adds
versionized_gt/— 18 independent parallel evolutions of thecode-execution-platformCDK stack, one per drift scenario. Every benchmark is a real gitrepository with real commits (4 to 14 each, 4 minimum) and a per-commit synthesized
CloudFormation template. All 18 share commit C1 =
fe2cb61byte-for-byte; divergencestarts at C2.
Companion to the text-paste (25), containerized-microservices (30), support-ticketing (28),
Bedrock-chatbot (32), image-website (21) and security-response (18) suites. This baseline is
an untrusted-code-execution sandbox: a WAF-protected API Gateway feeds a five-Lambda
pipeline (apiHandler → requestValidator → executionOrchestrator → resultProcessor →
responseHandler) that launches an ECS Fargate task to run submitted code, with S3
code/results buckets and a DynamoDB results table.
Total: 18 benchmarks, 151 commits, 45 MB, 100% verified and typechecked. Seven suites
now total 25 + 30 + 28 + 32 + 21 + 18 + 18 = 172 benchmarks.
Sized to the architecture, not to a number
The threat model is the sandbox boundary — the Fargate task that runs arbitrary user code,
the orchestrator that launches it, and the submitted-code bucket. So the honest drift shape
is privilege- and reachability-heavy with the code bucket as the crown-jewel exposure
asset; families are sized to the mechanisms that genuinely exist, with no padding.
Drift families
Each family holds severity to a single axis; every benchmark labels exactly two commits —
V2 (Mild) and V3 (Severe) — with the rest benign.
Cross-family pairs are scoreable — G4↔T2 (the same sandbox task role: permission
escalation vs trust widening), G1 (untrusted code reads all code then any bucket), and
the S3
BlockPublicAccessdrift E1 is a septuple-baseline oracle across all sevensuites.
Commit log structure
Every benchmark's
repository/is a genuine git repo (R1 shown):Author, date and identity are pinned so SHAs are reproducible. Every benchmark's C1 is
fe2cb61; divergence starts at C2.Commit-count distribution (no drift-position collision within a length):
Per-benchmark layout
Each
benchmarks-codeexec/<ID>/mirrors the source dataset's<app>/cdk/folder shape:Tooling written against
code-execution-platform/cdk/cdk.out/*.template.jsonworks againstbenchmarks-codeexec/R1/commits/C5/cdk/cdk.out/*.template.jsonwith only the root pathchanged. Resource counts run 72 (baseline) → 75.
metadata.yaml — the answer key
Deliberately outside
repository/so it can't leak into anything a detector reads. Percommit:
sha,label(V1/V2/V3/VB),commit_severity,cumulative_severity, and fordrift commits a
ground_truthblock with mechanism, path, controls present/absent/removed,transitive reach, and a
template_assertionstring.commit_severityis the driftintroduced by that commit;
cumulative_severityis the standing risk at that commit.Suite property worth naming
Template diff size is deliberately anti-correlated with severity. Benign cost-allocation
tag commits produce the largest diff (~400 lines); severe commits flip one or a few fields:
Any detector triaging by diff magnitude scores worse than chance.
Septuple-baseline oracle (free ground truth)
The source dataset's code bucket uses
BlockPublicAccess.BLOCK_ALL; E1 drifts it toall-false — the same mechanism as the E-family in all six prior suites. Detector
performance on synthetic vs. real curated drift for one mechanism is now comparable across
seven different stacks.
Known limitation
The baseline ships no
package.jsonat the cdk root, so noaws-cdk-libversion isdeclared; all templates were synthesized with 2.150.0 and commits flag
version_match: falseinprovenance.json(declaring the 2.100.0 default supplied at import). Within abenchmark every template comes from one library version, so cross-commit diffs are clean.
One tsc-only normalization is applied:
logs.RetentionDays.SEVEN_DAYSdoes not exist in2.150.0 and is replaced with
ONE_WEEK(both 7 days). Because rawts-nodesynth does notread
cdk.json, the required context (VPC/Fargate sizing, bucket/table names, and theWAF/Shield/SecurityHub feature flags) is injected via
synth_context.json; WAF is enabledso the WebACL exists at C1.
Not included
threat-model.json,canonical_ir.json, the7.*graph IRs,architecture.pnganddiagram.pyfrom the source dataset are absent — they come from tooling outside thisgenerator. A stale threat model copied forward would falsely assert "nothing changed" at
exactly the commits where the sandbox role turns admin or the executor becomes publicly
reachable, which is worse than having none. Run your own pipeline over
commits/C*/cdk/toproduce them.