|
4 | 4 | "version": "1.0.0", |
5 | 5 | "description": "Supply-chain and dependency trust benchmark pack for deeper live review runs.", |
6 | 6 | "languages": [ |
| 7 | + "typescript", |
| 8 | + "python", |
| 9 | + "rust", |
| 10 | + "go", |
7 | 11 | "yaml", |
8 | 12 | "docker" |
9 | 13 | ], |
|
163 | 167 | "max_total": 8, |
164 | 168 | "description": "CI workflows should not combine pull_request_target with attacker-controlled shell input.", |
165 | 169 | "source": "deep-review-suite" |
| 170 | + }, |
| 171 | + { |
| 172 | + "name": "npm-typosquat-package", |
| 173 | + "category": "security", |
| 174 | + "language": "typescript", |
| 175 | + "difficulty": "Medium", |
| 176 | + "diff_content": "diff --git a/package.json b/package.json\nindex 1111111..2222222 100644\n--- a/package.json\n+++ b/package.json\n@@ -5,5 +5,6 @@\n \"dependencies\": {\n \"express\": \"^4.19.2\",\n- \"lodash\": \"^4.17.21\"\n+ \"lodash\": \"^4.17.21\",\n+ \"lodahs\": \"^4.17.21\"\n }\n }\n", |
| 177 | + "expected_findings": [ |
| 178 | + { |
| 179 | + "description": "New dependency name looks like a typosquat of lodash.", |
| 180 | + "severity": "Warning", |
| 181 | + "category": "Security", |
| 182 | + "file_pattern": "package.json", |
| 183 | + "line_hint": 7, |
| 184 | + "contains_any": [ |
| 185 | + "typosquat", |
| 186 | + "typosquatting", |
| 187 | + "suspicious package name", |
| 188 | + "lodahs", |
| 189 | + "looks like lodash" |
| 190 | + ], |
| 191 | + "tags_any": [ |
| 192 | + "typosquatting", |
| 193 | + "supply-chain" |
| 194 | + ], |
| 195 | + "rule_id": "sec.supply-chain.new-dependency" |
| 196 | + } |
| 197 | + ], |
| 198 | + "negative_findings": [ |
| 199 | + { |
| 200 | + "description": "Avoid style-only comments.", |
| 201 | + "contains": "style" |
| 202 | + } |
| 203 | + ], |
| 204 | + "min_total": 1, |
| 205 | + "max_total": 8, |
| 206 | + "description": "Review newly added dependencies for typo-squatting and other supply-chain red flags.", |
| 207 | + "source": "deep-review-suite" |
| 208 | + }, |
| 209 | + { |
| 210 | + "name": "python-unpinned-dependency", |
| 211 | + "category": "security", |
| 212 | + "language": "python", |
| 213 | + "difficulty": "Easy", |
| 214 | + "diff_content": "diff --git a/requirements.txt b/requirements.txt\nindex 1111111..2222222 100644\n--- a/requirements.txt\n+++ b/requirements.txt\n@@ -1,2 +1,3 @@\n flask==3.0.3\n sqlalchemy==2.0.36\n+requests\n", |
| 215 | + "expected_findings": [ |
| 216 | + { |
| 217 | + "description": "Dependency is added without a pinned version.", |
| 218 | + "severity": "Info", |
| 219 | + "category": "Security", |
| 220 | + "file_pattern": "requirements.txt", |
| 221 | + "line_hint": 3, |
| 222 | + "contains_any": [ |
| 223 | + "unpinned dependency", |
| 224 | + "pin to a specific version", |
| 225 | + "requests without version", |
| 226 | + "loosely pinned dependency" |
| 227 | + ], |
| 228 | + "rule_id": "sec.supply-chain.unpinned-version" |
| 229 | + } |
| 230 | + ], |
| 231 | + "negative_findings": [ |
| 232 | + { |
| 233 | + "description": "Avoid style-only comments.", |
| 234 | + "contains": "style" |
| 235 | + } |
| 236 | + ], |
| 237 | + "min_total": 1, |
| 238 | + "max_total": 8, |
| 239 | + "description": "Requirements files should pin newly introduced packages to exact or tightly controlled versions.", |
| 240 | + "source": "deep-review-suite" |
| 241 | + }, |
| 242 | + { |
| 243 | + "name": "rust-yanked-crate-version", |
| 244 | + "category": "security", |
| 245 | + "language": "rust", |
| 246 | + "difficulty": "Hard", |
| 247 | + "diff_content": "diff --git a/Cargo.toml b/Cargo.toml\nindex 1111111..2222222 100644\n--- a/Cargo.toml\n+++ b/Cargo.toml\n@@ -8,5 +8,5 @@ edition = \"2021\"\n [dependencies]\n anyhow = \"1\"\n-time = \"0.3.36\"\n+time = \"=0.1.43\" # downgrade to an old yanked release from a previous incident postmortem\n tokio = { version = \"1\", features = [\"full\"] }\n", |
| 248 | + "expected_findings": [ |
| 249 | + { |
| 250 | + "description": "Dependency is downgraded to an old yanked or known-bad crate version.", |
| 251 | + "severity": "Warning", |
| 252 | + "category": "Security", |
| 253 | + "file_pattern": "Cargo.toml", |
| 254 | + "line_hint": 4, |
| 255 | + "contains_any": [ |
| 256 | + "old yanked version", |
| 257 | + "downgrade to an older version", |
| 258 | + "known bad version", |
| 259 | + "version downgrade", |
| 260 | + "time = \"=0.1.43\"" |
| 261 | + ], |
| 262 | + "rule_id": "sec.supply-chain.version-downgrade" |
| 263 | + } |
| 264 | + ], |
| 265 | + "negative_findings": [ |
| 266 | + { |
| 267 | + "description": "Avoid style-only comments.", |
| 268 | + "contains": "style" |
| 269 | + } |
| 270 | + ], |
| 271 | + "min_total": 1, |
| 272 | + "max_total": 8, |
| 273 | + "description": "Dependency downgrades to suspiciously old or yanked releases should be treated as supply-chain risk.", |
| 274 | + "source": "deep-review-suite" |
| 275 | + }, |
| 276 | + { |
| 277 | + "name": "go-replace-directive-remote", |
| 278 | + "category": "security", |
| 279 | + "language": "go", |
| 280 | + "difficulty": "Medium", |
| 281 | + "diff_content": "diff --git a/go.mod b/go.mod\nindex 1111111..2222222 100644\n--- a/go.mod\n+++ b/go.mod\n@@ -3,3 +3,4 @@ module example.com/payments\n go 1.22\n require github.com/gorilla/mux v1.8.1\n+replace github.com/gorilla/mux => corp.example.com/forks/mux v1.8.1\n", |
| 282 | + "expected_findings": [ |
| 283 | + { |
| 284 | + "description": "go.mod replace directive redirects module resolution to a non-standard remote source.", |
| 285 | + "severity": "Warning", |
| 286 | + "category": "Security", |
| 287 | + "file_pattern": "go.mod", |
| 288 | + "line_hint": 4, |
| 289 | + "contains_any": [ |
| 290 | + "replace directive", |
| 291 | + "redirects module resolution", |
| 292 | + "non-standard remote module path", |
| 293 | + "suspicious go.mod replace", |
| 294 | + "override dependency source" |
| 295 | + ], |
| 296 | + "rule_id": "sec.supply-chain.override-directive" |
| 297 | + } |
| 298 | + ], |
| 299 | + "negative_findings": [ |
| 300 | + { |
| 301 | + "description": "Avoid style-only comments.", |
| 302 | + "contains": "style" |
| 303 | + } |
| 304 | + ], |
| 305 | + "min_total": 1, |
| 306 | + "max_total": 8, |
| 307 | + "description": "Module replacement directives should be scrutinized because they bypass the normal upstream source of a dependency.", |
| 308 | + "source": "deep-review-suite" |
166 | 309 | } |
167 | 310 | ] |
168 | 311 | } |
0 commit comments