60 lines
9.6 KiB
JSON
60 lines
9.6 KiB
JSON
{
|
|
"profiles": ["trivial", "isolated", "logic", "integration", "data", "critical", "release"],
|
|
"requirements": {
|
|
"trivial": {"contract": false, "checks": "the diff; a targeted check when one exists", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "only on an anomaly (two send-backs, or a human correction)"},
|
|
"isolated": {"contract": true, "checks": "at least one that is not vacuous", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "yes"},
|
|
"logic": {"contract": true, "checks": "as isolated, each with covers", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "yes"},
|
|
"integration": {"contract": true, "checks": "as logic, plus invariants", "requirement_model": true, "risk_note": true, "independent_evidence": false, "retro": "yes"},
|
|
"data": {"contract": true, "checks": "as integration", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"},
|
|
"critical": {"contract": true, "checks": "as integration", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"},
|
|
"release": {"contract": true, "checks": "every check (--all)", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"}
|
|
},
|
|
"patterns": [
|
|
{"stage": "kind", "kind": "doc", "glob": ["**/*.{md,mdx,rst,adoc}", "**/{license,licence,copying,notice,authors,contributors}*", "**/.{gitignore,gitattributes,editorconfig,dockerignore,prettierignore,prettierrc*}", "docs/**", "**/docs/**"], "profile": "trivial", "reason": "documentation or repository metadata; no behaviour"},
|
|
{"stage": "kind", "kind": "asset", "glob": "**/*.{png,jpg,jpeg,gif,svg,ico,webp,avif,bmp,woff,woff2,ttf,otf,eot,mp3,mp4,wav,ogg,webm,pdf}", "profile": "trivial", "reason": "static asset or image; no behaviour"},
|
|
{"stage": "kind", "kind": "style", "glob": "**/*.{css,scss,sass,less,styl}", "profile": "trivial", "reason": "styling only"},
|
|
{"stage": "kind", "kind": "content", "glob": ["**/{locales,locale,i18n,translations}/**", "**/*.{po,pot}"], "profile": "trivial", "reason": "translated strings or copy; no behaviour"},
|
|
{"stage": "kind", "kind": "template", "glob": "**/.env.{example,sample,template,dist}", "profile": "isolated", "reason": "template of settings, no secrets, but it documents the configuration surface"},
|
|
{"stage": "kind", "kind": "fixture", "glob": ["**/{fixtures,testdata,golden,__snapshots__,__mocks__}/**", "**/*.snap"], "profile": "isolated", "reason": "test fixture or snapshot; data for tests, not behaviour"},
|
|
{"stage": "kind", "kind": "test", "glob": ["**/{tests,test,__tests__,e2e}/**", "**/spec/**/*.rb", "**/test_*.*", "**/*_test.*", "**/*_spec.*", "**/*.{test,spec}.*", "**/*{Test,Tests}.{java,kt,swift,cs,php,scala}"], "profile": "isolated", "reason": "test code: not trivial, and a test of data or critical code is at least logic", "elevate": true},
|
|
{"stage": "kind", "kind": "generated", "glob": ["**/{dist,target,__generated__,generated}/**", "**/*.{pb.go,generated.*,min.js,min.css,g.dart}", "**/*_pb2.py", "**/*_pb2_grpc.py", "**/__pycache__/**", "**/*.pyc"], "profile": "isolated", "reason": "generated or built output; the source that produces it carries the risk"},
|
|
{"stage": "kind", "kind": "lockfile", "glob": ["**/*.lock", "**/*.lockb", "**/*-lock.{json,yaml,yml}", "**/*.lock.json", "**/{go.sum,package.resolved,gradle.lockfile,flake.lock}", "**/npm-shrinkwrap.json"], "profile": "integration", "reason": "lockfile: the code you depend on changes without you writing it"},
|
|
{"stage": "kind", "kind": "manifest", "glob": ["**/{package.json,cargo.toml,go.mod,gemfile,pipfile,pyproject.toml,setup.py,setup.cfg,pom.xml,composer.json,package.swift,podfile,cartfile,mix.exs,pubspec.yaml,vcpkg.json,conanfile.txt,deno.json}", "**/requirements*.txt", "**/build.gradle*", "**/settings.gradle*", "**/*.{gemspec,csproj,fsproj}"], "profile": "integration", "reason": "dependency or packaging manifest: what your code depends on changes"},
|
|
{"stage": "kind", "kind": "vendor", "glob": "**/{vendor,third_party,third-party,node_modules}/**", "profile": "integration", "reason": "vendored code you did not write"},
|
|
{"stage": "kind", "kind": "build", "glob": "**/cmakelists.txt", "profile": "isolated", "reason": "build script; text extension, not documentation"},
|
|
{"stage": "kind", "kind": "text", "glob": "**/*.txt", "profile": "trivial", "reason": "plain text only"},
|
|
{"stage": "name", "token": ["auth", "authn", "authz", "authenticat*", "authoriz*", "oauth", "oidc", "saml", "jwt", "rbac", "acl", "iam", "permission*", "sudoers", "security"], "profile": "critical", "reason": "authentication, authorization or access control"},
|
|
{"stage": "name", "token": ["password*", "passwd", "credential*", "secret*", "keystore", "keychain", "keyring", "token*"], "scope": "dir", "profile": "critical", "reason": "secrets and credentials"},
|
|
{"stage": "name", "token": ["password*", "passwd", "credential*", "secret*", "keystore", "keychain", "keyring"], "scope": "stem", "profile": "critical", "reason": "secrets and credentials"},
|
|
{"stage": "name", "token": ["crypto*", "encrypt*", "decrypt*", "cipher*", "sha256", "aes", "tls"], "profile": "critical", "reason": "cryptography"},
|
|
{"stage": "name", "glob": ["**/.env", "**/.env.*", "**/*.pem", "**/*.key", "**/id_rsa*"], "profile": "critical", "reason": "real environment or key file may hold secrets"},
|
|
{"stage": "name", "token": ["payment*", "billing", "checkout"], "profile": "critical", "reason": "payments and billing move money"},
|
|
{"stage": "name", "token": ["mutex", "semaphore", "spinlock", "rwlock", "lock", "locks", "locking"], "profile": "critical", "reason": "concurrency primitive"},
|
|
{"stage": "name", "glob": ["**/{install,uninstall,installer,postinst,preinst}.{sh,bash,ps1,bat,py,rb,go,rs,js}", "**/PKGBUILD", "**/pkgbuild", "**/{postinst,preinst,postrm,prerm}"], "profile": "critical", "reason": "installer changes the user's machine"},
|
|
{"stage": "name", "glob": ["VERSION", "**/{release,releases,publish,deploy}.{sh,bash,ps1,py,rb,go,rs,mk,yml,yaml,toml,json,gradle}", "**/{release,releases}/**", "**/.goreleaser*", "**/release.config.*", "**/.github/workflows/*{release,publish,deploy}*"], "profile": "release", "reason": "release or deployment machinery"},
|
|
{"stage": "name", "glob": ["**/*.{sql,prisma,ddl,cql}", "**/db/schema.rb", "**/db/migrate/**"], "token": ["migrations", "migration", "migrate", "alembic", "flyway", "liquibase"], "profile": "data", "reason": "database migration or schema: stored data changes shape"},
|
|
{"stage": "name", "token": ["db", "database", "storage", "persist*", "backup", "restore"], "scope": "dir", "profile": "data", "reason": "persistence layer"},
|
|
{"stage": "name", "token": ["backup", "restore"], "scope": "stem", "profile": "data", "reason": "persistence layer or backup"},
|
|
{"stage": "name", "glob": ["include/**", "**/*.{proto,graphql,gql,thrift,avsc,wsdl}", "**/openapi*", "**/swagger*", "**/*.schema.json", "**/protos/**", "**/proto/**"], "profile": "integration", "reason": "public interface surface"},
|
|
{"stage": "name", "token": ["api", "apis"], "scope": "dir", "profile": "integration", "reason": "public interface surface"},
|
|
{"stage": "name", "glob": ["**/*{feature_flag,feature-flag,featureflag}*", "**/{flags,feature_flags,feature-flags}.*", "**/feature[_-]flags/**"], "profile": "integration", "reason": "runtime switches change behaviour across modules"},
|
|
{"stage": "name", "glob": ["**/*.{tf,tfvars}", "**/dockerfile*", "**/*.dockerfile", "**/docker-compose*.{yml,yaml}", "**/compose*.{yml,yaml}", "**/.github/workflows/**", "**/.gitlab-ci.yml", "**/jenkinsfile", "**/.circleci/**", "**/.travis.yml", "**/azure-pipelines.yml", "**/{terraform,k8s,kubernetes,helm,charts,ansible,infra,infrastructure,deploy}/**"], "profile": "integration", "reason": "infrastructure, pipeline or container definition"},
|
|
{"stage": "name", "glob": ["**/.githooks/**", "**/.husky/**"], "profile": "integration", "reason": "git hook runs automatically on every commit"},
|
|
{"stage": "name", "token": ["pars*", "lexer", "lexing", "tokeniz*", "codec"], "profile": "logic", "reason": "parsing has a broad input space"},
|
|
{"stage": "name", "token": ["money", "currenc*", "rounding", "pricing", "tax"], "profile": "logic", "reason": "money arithmetic must be exact"},
|
|
{"stage": "name", "glob": ["**/*state-machine*", "**/*statemachine*", "**/*state_machine*"], "token": ["algo", "algos", "algorithm*", "fsm"], "profile": "logic", "reason": "algorithmic logic"},
|
|
{"keyword": "migration", "profile": "data", "reason": "diff mentions a data migration"},
|
|
{"keyword": "schema change", "profile": "data", "reason": "diff changes a schema"},
|
|
{"keyword": "alter table", "profile": "data", "reason": "diff alters stored data"},
|
|
{"keyword": "drop table", "profile": "data", "reason": "diff drops stored data"},
|
|
{"keyword": "password", "profile": "critical", "reason": "diff handles credentials"},
|
|
{"keyword": "secret", "profile": "critical", "reason": "diff handles secrets"},
|
|
{"keyword": "encrypt", "profile": "critical", "reason": "diff uses cryptography"},
|
|
{"keyword": "authorize", "profile": "critical", "reason": "diff makes authorization decisions"},
|
|
{"keyword": "authentication", "profile": "critical", "reason": "diff handles authentication"},
|
|
{"keyword": "payment", "profile": "critical", "reason": "diff moves money"},
|
|
{"keyword": "mutex", "profile": "critical", "reason": "diff uses a concurrency primitive"},
|
|
{"keyword": "release candidate", "profile": "release", "reason": "diff prepares a release"}
|
|
]
|
|
}
|