drift_dataset_ticketing_sys - #18
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 — 28 benchmarks across 5 families
Summary
Adds
versionized_gt/— 28 independent parallel evolutions of thesupport-ticketing-systemCDK stack, one per drift scenario. Every benchmark is a realgit repository with real commits (4 to 15 each, 4 minimum) and a per-commit synthesized
CloudFormation template. All 28 share commit C1 =
99c3992byte-for-byte; divergencestarts at C2.
Total: 28 benchmarks, 241 commits, 75 MB, 100% verified and typechecked. Three suites
now total 25 + 30 + 28 = 83 benchmarks.
Drift families
Each family holds severity to a single axis and every benchmark labels exactly two
commits — V2 (Mild) and V3 (Severe) — with the rest benign.
Cross-family pairs are scoreable — G4↔T2↔D4 (managed-policy flip to
AdministratorAccess:internal vs cross-account partner vs cross-account vendor), G7↔T4 (SSM wildcard, local vs
foreign account), G5↔T6 (KMS grant, internal vs cross-account), T5↔T7 (wildcard principal,
inbound event bus vs queue injection). Eight axes are new versus the two prior baselines:
custom-authorizer reachability (R1, R4), APIGW→DynamoDB with no Lambda (R5), DynamoDB
privilege (G6), SSM access (G7, T4), S3 bucket-policy / SNS topic-policy exposure (E4, E5),
and SQS cross-account SendMessage (T7).
Commit log structure
Every benchmark's
repository/is a genuine git repo.git log,diff,show,bisectall work (R1 shown):Author, date and identity are pinned so SHAs are reproducible. Every benchmark's C1 is
99c3992; divergence starts at C2.Commit-count distribution (no drift-position collision within a length):
Per-benchmark layout
Each
benchmarks-support/<ID>/mirrors the source dataset's<app>/cdk/folder shape:Tooling written against
support-ticketing-system/cdk/cdk.out/*.template.jsonworksagainst
benchmarks-support/R1/commits/C5/cdk/cdk.out/*.template.jsonwith only the rootpath changed. Resource counts run 85 (baseline) → 101.
metadata.yaml — the answer key
Deliberately outside
repository/so it can't leak into anything a detector reads.Per commit:
sha,label(V1/V2/V3/VB),commit_severity,cumulative_severity, andfor drift commits a
ground_truthblock with mechanism, path, controlspresent/absent/removed/bypassed, transitive reach, and a
template_assertionstring.Two severity fields deliberately:
commit_severity= drift introduced by that commit;cumulative_severity= standing risk at that commit. In most benchmarks the commitsafter C1 sit at non-zero cumulative severity while introducing nothing — a false-positive
report there is wrong, and so is "all clear".
Suite property worth naming
Template diff size is deliberately anti-correlated with severity across the suite. Benign
cost-allocation tag commits propagate onto every taggable resource and produce the largest
diffs in most benchmarks (80–820 lines); severe commits typically flip one field:
STRIPE_VERIFY_SIGNATURE: 'true' → 'false')Any detector triaging by diff magnitude scores worse than chance.
One oracle drift (free ground truth)
The source dataset's own progression flips
attachmentBucketfromBlockPublicAccess.BLOCK_ALLto public, matching E1 — the same mechanism asbenchmarks/E5(paste) andbenchmarks-ecs/E3. That gives a triple-baseline oracle:detector performance on synthetic vs. real curated drift for one mechanism is directly
comparable across three different stacks.
Known limitation
The baseline declares
aws-cdk-lib@2.100.0, which would not install in the buildenvironment. All templates were synthesized with 2.150.0; commits flag
version_match: falseinprovenance.json(declaring 2.100.0 while synthesized with2.150.0). Within a benchmark every template comes from one library version, so cross-commit
diffs are clean. Three source constructs needed deterministic, semantics-preserving fixes to
compile against 2.150.0: RDS
encrypted→storageEncrypted, RDSencryptionKey→storageEncryptionKey, and the absentpackage.json/tsconfig.jsonsupplied as defaults atC1 import. Because raw
ts-nodesynth does not readcdk.jsoncontext, feature-flag context(
enableKmsEncryption,enableSsoIntegration, both true) is injected viasynth_context.jsonso the KMS key and
TokenAuthorizerexist at C1.Not included
acse-threat-model.json,checkov_results.*,architecture.pnganddiagram.pyfromthe source dataset's folder are absent — they come from tooling outside this generator. A
stale threat model copied forward would falsely assert "nothing changed" at exactly the
commits where auth boundaries disappear, which is worse than having none. Run your own
pipeline over
commits/C*/cdk/to produce them.