From 11869c8d10d4f5e2221b83102d58311cd47104c6 Mon Sep 17 00:00:00 2001
From: Nasser <42423897+Abdulnaser97@users.noreply.github.com>
Date: Fri, 3 Oct 2025 23:18:00 +0100
Subject: [PATCH 1/2] CodeCanvas: Save
---
cli.CodeCanvas | 6296 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 6296 insertions(+)
create mode 100644 cli.CodeCanvas
diff --git a/cli.CodeCanvas b/cli.CodeCanvas
new file mode 100644
index 0000000000..c550502b48
--- /dev/null
+++ b/cli.CodeCanvas
@@ -0,0 +1,6296 @@
+{
+ "drawioXML": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n",
+ "fileName": "",
+ "fileURL": "github",
+ "repoData": {
+ "src": {
+ "path": "src",
+ "fileName": "src",
+ "cellName": "src",
+ "cellId": "bfd50998-1830-423a-8f91-f0844b925fe1",
+ "visible": true,
+ "children": [
+ "src/cli",
+ "src/lib"
+ ]
+ },
+ "src/cli": {
+ "path": "src/cli",
+ "fileName": "cli",
+ "cellName": "cli",
+ "cellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1",
+ "children": [
+ "src/cli/index.ts",
+ "src/cli/args.ts",
+ "src/cli/commands"
+ ]
+ },
+ "src/cli/args.ts": {
+ "path": "src/cli/args.ts",
+ "fileName": "args.ts",
+ "cellName": "args.ts",
+ "cellId": "7b10594e-b24a-4584-a846-cbd86e3bfdbd",
+ "visible": true,
+ "parentCellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0"
+ },
+ "src/cli/commands": {
+ "path": "src/cli/commands",
+ "fileName": "commands",
+ "cellName": "commands",
+ "cellId": "7e45be32-f81c-4968-bfbe-7d29120ae0ca",
+ "visible": true,
+ "parentCellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0",
+ "children": [
+ "src/cli/commands/test",
+ "src/cli/commands/monitor"
+ ]
+ },
+ "src/cli/commands/monitor": {
+ "path": "src/cli/commands/monitor",
+ "fileName": "monitor",
+ "cellName": "monitor",
+ "cellId": "6639eeef-9194-4245-b9de-bb192b75d570",
+ "visible": true,
+ "parentCellId": "7e45be32-f81c-4968-bfbe-7d29120ae0ca",
+ "children": [
+ "src/cli/commands/monitor/index.ts"
+ ]
+ },
+ "src/cli/commands/monitor/index.ts": {
+ "path": "src/cli/commands/monitor/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "129e820f-d9fc-4629-8f71-ab98afacd790",
+ "visible": true,
+ "parentCellId": "6639eeef-9194-4245-b9de-bb192b75d570",
+ "children": [
+ "src/cli/commands/monitor/index.ts-simstep-8e548081-e285-47ef-85d6-4c08853749af",
+ "src/cli/commands/monitor/index.ts-simstep-b5623c1f-924f-4354-8f6c-df35c322664a"
+ ]
+ },
+ "src/cli/commands/test": {
+ "path": "src/cli/commands/test",
+ "fileName": "test",
+ "cellName": "test",
+ "cellId": "fd64c304-c3bd-4b9f-8b53-f8519e086d3e",
+ "visible": true,
+ "parentCellId": "7e45be32-f81c-4968-bfbe-7d29120ae0ca",
+ "children": [
+ "src/cli/commands/test/index.ts"
+ ]
+ },
+ "src/cli/commands/test/index.ts": {
+ "path": "src/cli/commands/test/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56",
+ "visible": true,
+ "parentCellId": "fd64c304-c3bd-4b9f-8b53-f8519e086d3e",
+ "children": [
+ "src/cli/commands/test/index.ts-simstep-50b3698d-b5c8-419c-a9d7-7f8a1eff33d5",
+ "src/cli/commands/test/index.ts-simstep-587a712f-f06c-4356-9789-ecfbe1f45384",
+ "src/cli/commands/test/index.ts-simstep-b34213b2-a09b-4926-a190-90e241f96556"
+ ]
+ },
+ "src/cli/index.ts": {
+ "path": "src/cli/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "2ab7344b-9b11-4740-9ac2-653e69710c81",
+ "visible": true,
+ "parentCellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0",
+ "children": [
+ "src/cli/index.ts-simstep-33e58eb3-d814-420e-8b30-6193facab1eb",
+ "src/cli/index.ts-simstep-13bd281a-d9bb-44ad-a014-b5f51f76aa80"
+ ]
+ },
+ "src/lib": {
+ "path": "src/lib",
+ "fileName": "lib",
+ "cellName": "lib",
+ "cellId": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1",
+ "children": [
+ "src/lib/snyk-test",
+ "src/lib/plugins",
+ "src/lib/formatters",
+ "src/lib/ecosystems",
+ "src/lib/monitor",
+ "src/lib/request"
+ ]
+ },
+ "src/lib/ecosystems": {
+ "path": "src/lib/ecosystems",
+ "fileName": "ecosystems",
+ "cellName": "ecosystems",
+ "cellId": "ab974bc6-ca88-45c9-8636-80e7b4a5030f",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "children": [
+ "src/lib/ecosystems/monitor.ts",
+ "src/lib/ecosystems/plugins.ts"
+ ]
+ },
+ "src/lib/ecosystems/monitor.ts": {
+ "path": "src/lib/ecosystems/monitor.ts",
+ "fileName": "monitor.ts",
+ "cellName": "monitor.ts",
+ "cellId": "9c6c0334-4bb3-4ed9-9c29-e9973dddb165",
+ "visible": true,
+ "parentCellId": "ab974bc6-ca88-45c9-8636-80e7b4a5030f",
+ "children": [
+ "src/lib/ecosystems/monitor.ts-simstep-af23c831-dab9-4d0a-8c29-b9d8a4015949"
+ ]
+ },
+ "src/lib/ecosystems/plugins.ts": {
+ "path": "src/lib/ecosystems/plugins.ts",
+ "fileName": "plugins.ts",
+ "cellName": "plugins.ts",
+ "cellId": "00667f37-a3a9-468d-8372-1d2395fe3133",
+ "visible": true,
+ "parentCellId": "ab974bc6-ca88-45c9-8636-80e7b4a5030f",
+ "children": [
+ "src/lib/ecosystems/plugins.ts-simstep-e31e64c1-4eda-4e2c-92c8-309ed2c01e7c"
+ ]
+ },
+ "src/lib/formatters": {
+ "path": "src/lib/formatters",
+ "fileName": "formatters",
+ "cellName": "formatters",
+ "cellId": "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "children": [
+ "src/lib/formatters/test",
+ "src/lib/formatters/format-monitor-response.ts"
+ ]
+ },
+ "src/lib/formatters/format-monitor-response.ts": {
+ "path": "src/lib/formatters/format-monitor-response.ts",
+ "fileName": "format-monitor-response.ts",
+ "cellName": "format-monitor-response.ts",
+ "cellId": "d62c84cb-9c2b-4738-9edc-2dce8a3941fb",
+ "visible": true,
+ "parentCellId": "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924",
+ "children": [
+ "src/lib/formatters/format-monitor-response.ts-simstep-6062ce68-9179-4264-91df-59ba447d3e89"
+ ]
+ },
+ "src/lib/formatters/test": {
+ "path": "src/lib/formatters/test",
+ "fileName": "test",
+ "cellName": "test",
+ "cellId": "0d1d4f47-8e96-42cc-8dae-d2fddfd10726",
+ "visible": true,
+ "parentCellId": "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924",
+ "children": [
+ "src/lib/formatters/test/display-result.ts"
+ ]
+ },
+ "src/lib/formatters/test/display-result.ts": {
+ "path": "src/lib/formatters/test/display-result.ts",
+ "fileName": "display-result.ts",
+ "cellName": "display-result.ts",
+ "cellId": "068b08fa-d016-455a-97e3-659677e90bd8",
+ "visible": true,
+ "parentCellId": "0d1d4f47-8e96-42cc-8dae-d2fddfd10726",
+ "children": [
+ "src/lib/formatters/test/display-result.ts-simstep-f7c6a307-dea6-4edc-b753-c64875aa9384",
+ "src/lib/formatters/test/display-result.ts-simstep-3e878605-ffbe-4b24-8218-68814b7d1386"
+ ]
+ },
+ "src/lib/monitor": {
+ "path": "src/lib/monitor",
+ "fileName": "monitor",
+ "cellName": "monitor",
+ "cellId": "ce22a7aa-f9c5-4b6b-ad6f-8e90757ec83a",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "children": [
+ "src/lib/monitor/index.ts"
+ ]
+ },
+ "src/lib/monitor/index.ts": {
+ "path": "src/lib/monitor/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "9948c60b-5daa-47a7-ad88-9c3794596bd9",
+ "visible": true,
+ "parentCellId": "ce22a7aa-f9c5-4b6b-ad6f-8e90757ec83a",
+ "children": [
+ "src/lib/monitor/index.ts-simstep-eaff140f-6c07-403b-bc5c-d97849b3cafe"
+ ]
+ },
+ "src/lib/plugins": {
+ "path": "src/lib/plugins",
+ "fileName": "plugins",
+ "cellName": "plugins",
+ "cellId": "4284ceb3-32e6-4844-b503-52766f741796",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "children": [
+ "src/lib/plugins/index.ts",
+ "src/lib/plugins/sast"
+ ]
+ },
+ "src/lib/plugins/index.ts": {
+ "path": "src/lib/plugins/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "9218c0a9-bf3d-4683-936c-5c2b95e0f080",
+ "visible": true,
+ "parentCellId": "4284ceb3-32e6-4844-b503-52766f741796",
+ "children": [
+ "src/lib/plugins/index.ts-simstep-be1c90e1-fd80-4037-980c-d28be03398b6"
+ ]
+ },
+ "src/lib/plugins/sast": {
+ "path": "src/lib/plugins/sast",
+ "fileName": "sast",
+ "cellName": "sast",
+ "cellId": "50fba5a7-be9e-4088-95d8-acf055b8f600",
+ "visible": true,
+ "parentCellId": "4284ceb3-32e6-4844-b503-52766f741796",
+ "children": [
+ "src/lib/plugins/sast/index.ts",
+ "src/lib/plugins/sast/settings.ts",
+ "src/lib/plugins/sast/checks.ts",
+ "src/lib/plugins/sast/analysis.ts"
+ ]
+ },
+ "src/lib/plugins/sast/analysis.ts": {
+ "path": "src/lib/plugins/sast/analysis.ts",
+ "fileName": "analysis.ts",
+ "cellName": "analysis.ts",
+ "cellId": "a0484c96-2ffe-4b58-a41b-210662c289ec",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600",
+ "children": [
+ "src/lib/plugins/sast/analysis.ts-simstep-dfab11fd-cca1-4915-9d98-c2d75f2de052",
+ "src/lib/plugins/sast/analysis.ts-simstep-1b157776-e26a-436c-b8be-beac0236b64e"
+ ]
+ },
+ "src/lib/plugins/sast/checks.ts": {
+ "path": "src/lib/plugins/sast/checks.ts",
+ "fileName": "checks.ts",
+ "cellName": "checks.ts",
+ "cellId": "9cee7e4e-4e60-4934-9b0a-eee48665dc9a",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600"
+ },
+ "src/lib/plugins/sast/index.ts": {
+ "path": "src/lib/plugins/sast/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600",
+ "children": [
+ "src/lib/plugins/sast/index.ts-simstep-c8c7ee4e-8f17-4c1b-b813-d7f6d360e219",
+ "src/lib/plugins/sast/index.ts-simstep-f74a6059-bcdc-4780-ab4c-769a3d998f2b"
+ ]
+ },
+ "src/lib/plugins/sast/settings.ts": {
+ "path": "src/lib/plugins/sast/settings.ts",
+ "fileName": "settings.ts",
+ "cellName": "settings.ts",
+ "cellId": "e88475f8-7204-4e16-a443-54617e08dd29",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600",
+ "children": [
+ "src/lib/plugins/sast/settings.ts-simstep-c6491e83-01e8-4cbe-b2b6-b7e276d682b0",
+ "src/lib/plugins/sast/settings.ts-simstep-1cc334ad-bea1-456c-bbba-909a81ae0d19"
+ ]
+ },
+ "src/lib/request": {
+ "path": "src/lib/request",
+ "fileName": "request",
+ "cellName": "request",
+ "cellId": "865fb20e-d26a-406b-9f19-9767d9f3234b",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "children": [
+ "src/lib/request/promise.ts"
+ ]
+ },
+ "src/lib/request/promise.ts": {
+ "path": "src/lib/request/promise.ts",
+ "fileName": "promise.ts",
+ "cellName": "promise.ts",
+ "cellId": "bf9c39ae-73d3-440c-9f52-9b084099d09d",
+ "visible": true,
+ "parentCellId": "865fb20e-d26a-406b-9f19-9767d9f3234b"
+ },
+ "src/lib/snyk-test": {
+ "path": "src/lib/snyk-test",
+ "fileName": "snyk-test",
+ "cellName": "snyk-test",
+ "cellId": "0d44f382-7f12-4d1a-a845-6414b66ff034",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "children": [
+ "src/lib/snyk-test/legacy.ts",
+ "src/lib/snyk-test/run-test.ts",
+ "src/lib/snyk-test/assemble-payloads.ts"
+ ]
+ },
+ "src/lib/snyk-test/assemble-payloads.ts": {
+ "path": "src/lib/snyk-test/assemble-payloads.ts",
+ "fileName": "assemble-payloads.ts",
+ "cellName": "assemble-payloads.ts",
+ "cellId": "642b90fd-b953-4d96-94af-68ff69427e75",
+ "visible": true,
+ "parentCellId": "0d44f382-7f12-4d1a-a845-6414b66ff034"
+ },
+ "src/lib/snyk-test/legacy.ts": {
+ "path": "src/lib/snyk-test/legacy.ts",
+ "fileName": "legacy.ts",
+ "cellName": "legacy.ts",
+ "cellId": "9a41c7a7-4333-418d-b6fd-9f73bebda86f",
+ "visible": true,
+ "parentCellId": "0d44f382-7f12-4d1a-a845-6414b66ff034"
+ },
+ "src/lib/snyk-test/run-test.ts": {
+ "path": "src/lib/snyk-test/run-test.ts",
+ "fileName": "run-test.ts",
+ "cellName": "run-test.ts",
+ "cellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61",
+ "visible": true,
+ "parentCellId": "0d44f382-7f12-4d1a-a845-6414b66ff034",
+ "children": [
+ "src/lib/snyk-test/run-test.ts-simstep-ff3a68d1-f59b-4605-9003-fa083a8db7e5",
+ "src/lib/snyk-test/run-test.ts-simstep-7c6a3c19-c15b-4314-bc8e-c95d466b9df8",
+ "src/lib/snyk-test/run-test.ts-simstep-95d173c1-33b2-404b-b876-d38f5c6b6eb7",
+ "src/lib/snyk-test/run-test.ts-simstep-ec2ecf88-bea3-44f8-a9b2-3d9cbc4614cb"
+ ]
+ },
+ "snyk-cli-b8d7f01/help/cli-commands/sbom.md": {
+ "path": "snyk-cli-b8d7f01/help/cli-commands/sbom.md",
+ "fileName": "sbom.md",
+ "cellName": "sbom.md",
+ "cellId": "2a94082d-8e68-4e8c-b792-def89c69a845",
+ "visible": true,
+ "parentCellId": "0ec29183-bdee-470d-a429-c31d5f14dc31",
+ "children": [
+ "snyk-cli-b8d7f01/help/cli-commands/sbom.md-simstep-e5f0127f-0d5e-4cff-93d7-559a74ce558e",
+ "snyk-cli-b8d7f01/help/cli-commands/sbom.md-simstep-e169da2c-940a-4ce4-b955-43cccdc9a50b"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "4c3e5d19-448e-4a7a-81ec-1ec31b8abd86",
+ "visible": true,
+ "parentCellId": "59e69954-918d-4917-bc2d-23e6829dc151",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts-simstep-e3655bbf-11b4-4582-8454-2ee3da1bfda1"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts",
+ "fileName": "show-results-summary.ts",
+ "cellName": "show-results-summary.ts",
+ "cellId": "bc7bd2a2-93a3-4672-9b1d-966a0898cb62",
+ "visible": true,
+ "parentCellId": "1984c9cc-b2ee-440a-8935-d0208207f4cc",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts-simstep-d93d1e26-1f42-4436-b8bd-871ef289ebaa"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts",
+ "fileName": "load-plugin.ts",
+ "cellName": "load-plugin.ts",
+ "cellId": "a4f86384-1372-48c7-b952-39891002f67e",
+ "visible": true,
+ "parentCellId": "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts-simstep-56eb6e35-443f-4a6c-8652-3440950fda43"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "88671fb5-68ef-4480-9cd9-e901d9d57f4a",
+ "visible": true,
+ "parentCellId": "0f465fbf-3267-4774-9abf-c1b748d9552a",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts-simstep-2f0287d8-5b84-4ea8-8592-a8bcac01e1d7"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/index.ts": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "21cb1ec8-b5c9-4be8-a30a-430e85371b2a",
+ "visible": true,
+ "parentCellId": "62c7871e-53a6-49eb-9bf9-417a92c06e17"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "visible": true,
+ "parentCellId": "53793438-dce6-483a-8993-97e7662a8d42",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-d272eaa7-ead0-48f4-8297-17ee2edb70ee",
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-bb8323cf-b3be-4b7a-bfdf-b00724fd94d2",
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-1f53ea1d-132d-4d0a-81c8-5e43ce78c9f7",
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-21a1edc6-531a-412d-824f-2fcf89a7c636",
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-8f197ea3-6a58-4ebe-b7da-ace35c8c0437",
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-e29be9f6-e5fc-469c-b36c-36e24fef78a4",
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-100156ef-69a7-4d75-a012-8e52701516bc",
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-a6b0976a-109e-48a8-8f27-ec9c921b6a3f"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts",
+ "fileName": "verify.ts",
+ "cellName": "verify.ts",
+ "cellId": "d8d32c3e-3063-49d2-9748-955fe2e54502",
+ "visible": true,
+ "parentCellId": "53793438-dce6-483a-8993-97e7662a8d42",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts-simstep-bd504c66-5262-4759-9652-788c78022410"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "58c1e862-ffc7-4a03-8a44-e607d59662db",
+ "visible": true,
+ "parentCellId": "1bd31dba-e628-45c2-b14d-ba7136d9fbc1",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts-simstep-73da6b68-0a68-4c57-8933-f8fa56819537",
+ "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts-simstep-d86c37d2-95f9-40ce-aa4e-626595032e96"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts",
+ "fileName": "validate-fix-command-is-supported.ts",
+ "cellName": "validate-fix-command-is-supported.ts",
+ "cellId": "0ad50987-c84c-4ac4-97c6-f63728ed3520",
+ "visible": true,
+ "parentCellId": "1bd31dba-e628-45c2-b14d-ba7136d9fbc1",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts-simstep-574dabd8-20ff-4005-bc6e-2b5c32e69c51"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "2f2829a3-ab4f-403a-b1e9-147673e82388",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts-simstep-0d610bd9-4b7a-4394-a94d-7e9ab0220bb5"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts",
+ "fileName": "file-parser.ts",
+ "cellName": "file-parser.ts",
+ "cellId": "ceb4375e-c06d-4597-aebe-23cfcaa9c49c",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts-simstep-53a50076-1327-4f49-8529-b8e1d95c4fb5"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts",
+ "fileName": "file-scanner.ts",
+ "cellName": "file-scanner.ts",
+ "cellId": "41734f98-e809-4868-b95a-b0729812ab46",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts-simstep-9f1609b0-7cca-43d9-ac49-d96eefddadbd"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts",
+ "fileName": "index.ts",
+ "cellName": "index.ts",
+ "cellId": "31646bb2-a8da-4354-abfa-a105b8b4aaca",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts-simstep-7bb3e65e-b598-465d-babc-5a3357482b7b"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts",
+ "fileName": "results-formatter.ts",
+ "cellName": "results-formatter.ts",
+ "cellId": "b2d182fe-c593-4fa9-94df-2fd932bafcce",
+ "visible": true,
+ "parentCellId": "cc1b7e58-07b9-482b-b6cc-2172da07350e",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts-simstep-c8fb9227-5b43-4a25-8daf-7e99770617ec"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts",
+ "fileName": "output.ts",
+ "cellName": "output.ts",
+ "cellId": "3f85cfa7-b2ff-4be6-a2a0-d573729fafa8",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts-simstep-8017e430-d4ab-4001-99b7-073177b5e2a9"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/scan.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/scan.ts",
+ "fileName": "scan.ts",
+ "cellName": "scan.ts",
+ "cellId": "59e9a36e-2dea-47b9-8aa3-2e16bff95bce",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/types.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/types.ts",
+ "fileName": "types.ts",
+ "cellName": "types.ts",
+ "cellId": "6e65834a-7297-4c37-adcc-773907c98314",
+ "visible": true,
+ "parentCellId": "53827863-cec6-4af5-a0c9-b4e71516e392"
+ },
+ "snyk-cli-b8d7f01/src/cli/main.ts": {
+ "path": "snyk-cli-b8d7f01/src/cli/main.ts",
+ "fileName": "main.ts",
+ "cellName": "main.ts",
+ "cellId": "53a7517a-bd53-44fe-b38b-d41992699829",
+ "visible": true,
+ "parentCellId": "35b595f8-07a0-4381-8583-2864f74392cb",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/main.ts-simstep-e7cd21df-d14a-4a0c-8a15-cfbadc5b7d39",
+ "snyk-cli-b8d7f01/src/cli/main.ts-simstep-f37c67d6-73f0-41c2-9f61-241dad33c1da",
+ "snyk-cli-b8d7f01/src/cli/main.ts-simstep-e12b444d-aecf-4f5b-840d-f71e82e84bf3"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts": {
+ "path": "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts",
+ "fileName": "format-test-results.ts",
+ "cellName": "format-test-results.ts",
+ "cellId": "a2b82ea8-7b7c-48b2-b06e-bbf26f4c89a4",
+ "visible": true,
+ "parentCellId": "f1c3c149-991f-43e6-8f1b-4cfff7de36ce",
+ "children": [
+ "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts-simstep-58f1dcbe-41e0-4f29-bb87-253c6f14ffa0"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts": {
+ "path": "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts",
+ "fileName": "find-and-load-policy.ts",
+ "cellName": "find-and-load-policy.ts",
+ "cellId": "31bdaa23-2cd5-490c-8543-b3416ce603fa",
+ "visible": true,
+ "parentCellId": "79ea1c0b-29c7-45f0-96a0-0c38ddc37ae9",
+ "children": [
+ "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts-simstep-75f10feb-80fe-4a6c-8622-902f5cd7d812"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts": {
+ "path": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts",
+ "fileName": "run-test.ts",
+ "cellName": "run-test.ts",
+ "cellId": "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f",
+ "visible": true,
+ "parentCellId": "2c16b46f-4304-49df-9564-85bde1cc5b30",
+ "children": [
+ "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts-simstep-cf4028f1-9fdf-43d6-b653-4429a498c884",
+ "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts-simstep-5a85d419-6e13-494a-98ad-93ec19bbd313"
+ ]
+ },
+ "snyk-cli-b8d7f01/test/acceptance/fake-server.ts": {
+ "path": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts",
+ "fileName": "fake-server.ts",
+ "cellName": "fake-server.ts",
+ "cellId": "abbe9a10-c7b1-40f9-acf0-236755130bef",
+ "visible": true,
+ "parentCellId": "4c7cf884-6ec5-4018-a74d-7aeb078fb2ef",
+ "children": [
+ "snyk-cli-b8d7f01/test/acceptance/fake-server.ts-simstep-f671fc80-497a-4f02-aa7d-2268e86d8a04"
+ ]
+ },
+ "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts": {
+ "path": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts",
+ "fileName": "sbom.spec.ts",
+ "cellName": "sbom.spec.ts",
+ "cellId": "6fde9c8f-c276-42ae-8343-b7160512d3f4",
+ "visible": true,
+ "parentCellId": "078d87e8-7b02-428a-b089-8a7bd823f021",
+ "children": [
+ "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts-simstep-da6075bd-7a85-4ca3-b85f-459cf4d7dc81",
+ "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts-simstep-f044fa90-9219-4a05-94db-836fca272120"
+ ]
+ },
+ "bfd50998-1830-423a-8f91-f0844b925fe1": {
+ "path": "bfd50998-1830-423a-8f91-f0844b925fe1",
+ "cellName": "src",
+ "cellId": "bfd50998-1830-423a-8f91-f0844b925fe1",
+ "visible": true
+ },
+ "a82fc320-1ca5-408c-b8e1-598c2b1271e0": {
+ "path": "a82fc320-1ca5-408c-b8e1-598c2b1271e0",
+ "cellName": "cli",
+ "cellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1"
+ },
+ "41d2a457-f55a-4008-b20c-d732466c69ac": {
+ "path": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "cellName": "lib",
+ "cellId": "41d2a457-f55a-4008-b20c-d732466c69ac",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1"
+ },
+ "2ab7344b-9b11-4740-9ac2-653e69710c81": {
+ "path": "2ab7344b-9b11-4740-9ac2-653e69710c81",
+ "cellName": "index.ts",
+ "cellId": "2ab7344b-9b11-4740-9ac2-653e69710c81",
+ "visible": true,
+ "parentCellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0"
+ },
+ "7b10594e-b24a-4584-a846-cbd86e3bfdbd": {
+ "path": "7b10594e-b24a-4584-a846-cbd86e3bfdbd",
+ "cellName": "args.ts",
+ "cellId": "7b10594e-b24a-4584-a846-cbd86e3bfdbd",
+ "visible": true,
+ "parentCellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0"
+ },
+ "7e45be32-f81c-4968-bfbe-7d29120ae0ca": {
+ "path": "7e45be32-f81c-4968-bfbe-7d29120ae0ca",
+ "cellName": "commands",
+ "cellId": "7e45be32-f81c-4968-bfbe-7d29120ae0ca",
+ "visible": true,
+ "parentCellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0"
+ },
+ "0d44f382-7f12-4d1a-a845-6414b66ff034": {
+ "path": "0d44f382-7f12-4d1a-a845-6414b66ff034",
+ "cellName": "snyk-test",
+ "cellId": "0d44f382-7f12-4d1a-a845-6414b66ff034",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "4284ceb3-32e6-4844-b503-52766f741796": {
+ "path": "4284ceb3-32e6-4844-b503-52766f741796",
+ "cellName": "plugins",
+ "cellId": "4284ceb3-32e6-4844-b503-52766f741796",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924": {
+ "path": "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924",
+ "cellName": "formatters",
+ "cellId": "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "fd64c304-c3bd-4b9f-8b53-f8519e086d3e": {
+ "path": "fd64c304-c3bd-4b9f-8b53-f8519e086d3e",
+ "cellName": "test",
+ "cellId": "fd64c304-c3bd-4b9f-8b53-f8519e086d3e",
+ "visible": true,
+ "parentCellId": "7e45be32-f81c-4968-bfbe-7d29120ae0ca"
+ },
+ "9a41c7a7-4333-418d-b6fd-9f73bebda86f": {
+ "path": "9a41c7a7-4333-418d-b6fd-9f73bebda86f",
+ "cellName": "legacy.ts",
+ "cellId": "9a41c7a7-4333-418d-b6fd-9f73bebda86f",
+ "visible": true,
+ "parentCellId": "0d44f382-7f12-4d1a-a845-6414b66ff034"
+ },
+ "fbcc93cc-edb3-41be-8008-34cf45f26d61": {
+ "path": "fbcc93cc-edb3-41be-8008-34cf45f26d61",
+ "cellName": "run-test.ts",
+ "cellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61",
+ "visible": true,
+ "parentCellId": "0d44f382-7f12-4d1a-a845-6414b66ff034"
+ },
+ "9218c0a9-bf3d-4683-936c-5c2b95e0f080": {
+ "path": "9218c0a9-bf3d-4683-936c-5c2b95e0f080",
+ "cellName": "index.ts",
+ "cellId": "9218c0a9-bf3d-4683-936c-5c2b95e0f080",
+ "visible": true,
+ "parentCellId": "4284ceb3-32e6-4844-b503-52766f741796"
+ },
+ "0d1d4f47-8e96-42cc-8dae-d2fddfd10726": {
+ "path": "0d1d4f47-8e96-42cc-8dae-d2fddfd10726",
+ "cellName": "test",
+ "cellId": "0d1d4f47-8e96-42cc-8dae-d2fddfd10726",
+ "visible": true,
+ "parentCellId": "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924"
+ },
+ "d6e84c3c-2b69-42d8-a59b-af74ff80fa56": {
+ "path": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56",
+ "cellName": "index.ts",
+ "cellId": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56",
+ "visible": true,
+ "parentCellId": "fd64c304-c3bd-4b9f-8b53-f8519e086d3e"
+ },
+ "068b08fa-d016-455a-97e3-659677e90bd8": {
+ "path": "068b08fa-d016-455a-97e3-659677e90bd8",
+ "cellName": "display-result.ts",
+ "cellId": "068b08fa-d016-455a-97e3-659677e90bd8",
+ "visible": true,
+ "parentCellId": "0d1d4f47-8e96-42cc-8dae-d2fddfd10726"
+ },
+ "cd9c671a-2673-44bb-af50-6d363f4c8e96": {
+ "path": "cd9c671a-2673-44bb-af50-6d363f4c8e96",
+ "cellName": "User Initiates Scan - index.ts:L18-23",
+ "cellId": "cd9c671a-2673-44bb-af50-6d363f4c8e96",
+ "visible": true,
+ "parentCellId": "2ab7344b-9b11-4740-9ac2-653e69710c81"
+ },
+ "src/cli/index.ts-simstep-33e58eb3-d814-420e-8b30-6193facab1eb": {
+ "path": "src/cli/index.ts-simstep-33e58eb3-d814-420e-8b30-6193facab1eb",
+ "fileName": "index.ts",
+ "wiki": "A user runs the `snyk test` command in their project's root directory. The command-line arguments are captured by the CLI's main entry point.",
+ "cellName": "User Initiates Scan - index.ts:L18-23",
+ "cellId": "cd9c671a-2673-44bb-af50-6d363f4c8e96",
+ "visible": true,
+ "startLine": 18,
+ "endLine": 23,
+ "parentCellId": "2ab7344b-9b11-4740-9ac2-653e69710c81",
+ "parentPath": "src/cli/index.ts"
+ },
+ "3c999446-05f8-4cee-9b80-054fa65cdef0": {
+ "path": "3c999446-05f8-4cee-9b80-054fa65cdef0",
+ "cellName": "Initialize Test Command - index.ts:L70-73",
+ "cellId": "3c999446-05f8-4cee-9b80-054fa65cdef0",
+ "visible": true,
+ "parentCellId": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56"
+ },
+ "src/cli/commands/test/index.ts-simstep-50b3698d-b5c8-419c-a9d7-7f8a1eff33d5": {
+ "path": "src/cli/commands/test/index.ts-simstep-50b3698d-b5c8-419c-a9d7-7f8a1eff33d5",
+ "fileName": "index.ts",
+ "wiki": "The `test` command module is invoked. It sets default options, validates credentials and arguments, and prepares for the scan. For Open Source scans, it determines which package manager to use.",
+ "cellName": "Initialize Test Command - index.ts:L70-73",
+ "cellId": "3c999446-05f8-4cee-9b80-054fa65cdef0",
+ "visible": true,
+ "startLine": 70,
+ "endLine": 73,
+ "parentCellId": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56",
+ "parentPath": "src/cli/commands/test/index.ts"
+ },
+ "13d92073-022e-4f7c-bcbb-aebdda685f95": {
+ "path": "13d92073-022e-4f7c-bcbb-aebdda685f95",
+ "cellName": "Build Dependency Graph - index.ts:L78-84",
+ "cellId": "13d92073-022e-4f7c-bcbb-aebdda685f95",
+ "visible": true,
+ "parentCellId": "9218c0a9-bf3d-4683-936c-5c2b95e0f080"
+ },
+ "src/lib/plugins/index.ts-simstep-be1c90e1-fd80-4037-980c-d28be03398b6": {
+ "path": "src/lib/plugins/index.ts-simstep-be1c90e1-fd80-4037-980c-d28be03398b6",
+ "fileName": "index.ts",
+ "wiki": "The appropriate plugin (e.g., nodejs-plugin for npm/yarn) is loaded. It inspects manifest files like `package.json` and `package-lock.json` to build a detailed dependency graph.",
+ "cellName": "Build Dependency Graph - index.ts:L78-84",
+ "cellId": "13d92073-022e-4f7c-bcbb-aebdda685f95",
+ "visible": true,
+ "startLine": 78,
+ "endLine": 84,
+ "parentCellId": "9218c0a9-bf3d-4683-936c-5c2b95e0f080",
+ "parentPath": "src/lib/plugins/index.ts"
+ },
+ "12922438-a1a3-4615-be47-ce6af952ebe1": {
+ "path": "12922438-a1a3-4615-be47-ce6af952ebe1",
+ "cellName": "Send Analysis Request to Snyk API - run-test.ts:L184-191",
+ "cellId": "12922438-a1a3-4615-be47-ce6af952ebe1",
+ "visible": true,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61"
+ },
+ "src/lib/snyk-test/run-test.ts-simstep-ff3a68d1-f59b-4605-9003-fa083a8db7e5": {
+ "path": "src/lib/snyk-test/run-test.ts-simstep-ff3a68d1-f59b-4605-9003-fa083a8db7e5",
+ "fileName": "run-test.ts",
+ "wiki": "The CLI sends the dependency graph payload to the Snyk API endpoint for vulnerability analysis. This is an HTTP POST request.",
+ "cellName": "Send Analysis Request to Snyk API - run-test.ts:L184-191",
+ "cellId": "12922438-a1a3-4615-be47-ce6af952ebe1",
+ "visible": true,
+ "startLine": 184,
+ "endLine": 191,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61",
+ "parentPath": "src/lib/snyk-test/run-test.ts"
+ },
+ "c717e177-bddb-4352-8a9e-5a03bcb666ef": {
+ "path": "c717e177-bddb-4352-8a9e-5a03bcb666ef",
+ "cellName": "Format and Display Results - display-result.ts:L27-31",
+ "cellId": "c717e177-bddb-4352-8a9e-5a03bcb666ef",
+ "visible": true,
+ "parentCellId": "068b08fa-d016-455a-97e3-659677e90bd8"
+ },
+ "src/lib/formatters/test/display-result.ts-simstep-f7c6a307-dea6-4edc-b753-c64875aa9384": {
+ "path": "src/lib/formatters/test/display-result.ts-simstep-f7c6a307-dea6-4edc-b753-c64875aa9384",
+ "fileName": "display-result.ts",
+ "wiki": "The `display-result` formatter takes the structured API response and generates the human-readable report that is displayed in the user's terminal, including issue descriptions, paths, and remediation advice.",
+ "cellName": "Format and Display Results - display-result.ts:L27-31",
+ "cellId": "c717e177-bddb-4352-8a9e-5a03bcb666ef",
+ "visible": true,
+ "startLine": 27,
+ "endLine": 31,
+ "parentCellId": "068b08fa-d016-455a-97e3-659677e90bd8",
+ "parentPath": "src/lib/formatters/test/display-result.ts"
+ },
+ "d1709c7d-bb03-47ec-9825-cdb64b39b6d0": {
+ "path": "d1709c7d-bb03-47ec-9825-cdb64b39b6d0",
+ "cellName": "Exit with Status Code - index.ts:L141-151",
+ "cellId": "d1709c7d-bb03-47ec-9825-cdb64b39b6d0",
+ "visible": true,
+ "parentCellId": "2ab7344b-9b11-4740-9ac2-653e69710c81"
+ },
+ "src/cli/index.ts-simstep-13bd281a-d9bb-44ad-a014-b5f51f76aa80": {
+ "path": "src/cli/index.ts-simstep-13bd281a-d9bb-44ad-a014-b5f51f76aa80",
+ "fileName": "index.ts",
+ "wiki": "Based on the scan results, the CLI process exits with an appropriate status code. A non-zero exit code (typically 1) is used when vulnerabilities are found, which can be used to fail CI/CD pipelines.",
+ "cellName": "Exit with Status Code - index.ts:L141-151",
+ "cellId": "d1709c7d-bb03-47ec-9825-cdb64b39b6d0",
+ "visible": true,
+ "startLine": 141,
+ "endLine": 151,
+ "parentCellId": "2ab7344b-9b11-4740-9ac2-653e69710c81",
+ "parentPath": "src/cli/index.ts"
+ },
+ "bb823e65-fbfd-4b67-92cb-5c30c3b14e63": {
+ "path": "bb823e65-fbfd-4b67-92cb-5c30c3b14e63",
+ "cellName": "Command Dispatch",
+ "cellId": "bb823e65-fbfd-4b67-92cb-5c30c3b14e63",
+ "visible": true,
+ "parentCellId": "a82fc320-1ca5-408c-b8e1-598c2b1271e0"
+ },
+ "generated-edge-simstep-ab2cfd18-b8a9-40b6-938c-a2e83f754024-bb823e65-fbfd-4b67-92cb-5c30c3b14e63": {
+ "path": "generated-edge-simstep-ab2cfd18-b8a9-40b6-938c-a2e83f754024-bb823e65-fbfd-4b67-92cb-5c30c3b14e63",
+ "fileName": "index.ts",
+ "cellName": "Command Dispatch",
+ "cellId": "bb823e65-fbfd-4b67-92cb-5c30c3b14e63",
+ "visible": true,
+ "startLine": 123,
+ "endLine": 127,
+ "parentPath": "src/cli/index.ts"
+ },
+ "6e5909fc-2d5e-4bcd-a631-2f92b6604e96": {
+ "path": "6e5909fc-2d5e-4bcd-a631-2f92b6604e96",
+ "cellName": "Request Dependency\nGraph",
+ "cellId": "6e5909fc-2d5e-4bcd-a631-2f92b6604e96",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1"
+ },
+ "generated-edge-simstep-aea45172-6cbe-4f27-8c31-f6c2656c1012-6e5909fc-2d5e-4bcd-a631-2f92b6604e96": {
+ "path": "generated-edge-simstep-aea45172-6cbe-4f27-8c31-f6c2656c1012-6e5909fc-2d5e-4bcd-a631-2f92b6604e96",
+ "fileName": "index.ts",
+ "cellName": "Request Dependency Graph",
+ "cellId": "6e5909fc-2d5e-4bcd-a631-2f92b6604e96",
+ "visible": true,
+ "startLine": 59,
+ "endLine": 62,
+ "parentPath": "src/cli/commands/test/index.ts"
+ },
+ "ef86b2bd-4849-4d8e-a38a-faeb68cff554": {
+ "path": "ef86b2bd-4849-4d8e-a38a-faeb68cff554",
+ "cellName": "Submit Dependency\nGraph for\nAnalysis",
+ "cellId": "ef86b2bd-4849-4d8e-a38a-faeb68cff554",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "generated-edge-simstep-aa16da24-1280-4114-9a41-cb469e2911dc-ef86b2bd-4849-4d8e-a38a-faeb68cff554": {
+ "path": "generated-edge-simstep-aa16da24-1280-4114-9a41-cb469e2911dc-ef86b2bd-4849-4d8e-a38a-faeb68cff554",
+ "fileName": "index.ts",
+ "cellName": "Submit Dependency Graph for Analysis",
+ "cellId": "ef86b2bd-4849-4d8e-a38a-faeb68cff554",
+ "visible": true,
+ "startLine": 141,
+ "endLine": 151,
+ "parentPath": "src/lib/plugins/index.ts"
+ },
+ "4084b9c6-e000-4317-bfb8-b7b4eb72f979": {
+ "path": "4084b9c6-e000-4317-bfb8-b7b4eb72f979",
+ "cellName": "Return Analysis\nResults",
+ "cellId": "4084b9c6-e000-4317-bfb8-b7b4eb72f979",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "generated-edge-simstep-d10fb181-5500-45a0-85b1-50040a07a97f-4084b9c6-e000-4317-bfb8-b7b4eb72f979": {
+ "path": "generated-edge-simstep-d10fb181-5500-45a0-85b1-50040a07a97f-4084b9c6-e000-4317-bfb8-b7b4eb72f979",
+ "fileName": "run-test.ts",
+ "cellName": "Return Analysis Results",
+ "cellId": "4084b9c6-e000-4317-bfb8-b7b4eb72f979",
+ "visible": true,
+ "startLine": 86,
+ "endLine": 86,
+ "parentPath": "src/lib/snyk-test/run-test.ts"
+ },
+ "e9f0e552-cd4a-4e87-9aef-5732c9ceb8da": {
+ "path": "e9f0e552-cd4a-4e87-9aef-5732c9ceb8da",
+ "cellName": "Output to\nConsole",
+ "cellId": "e9f0e552-cd4a-4e87-9aef-5732c9ceb8da",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1"
+ },
+ "generated-edge-simstep-7874c48f-39d8-460e-9179-6a4082441eb0-e9f0e552-cd4a-4e87-9aef-5732c9ceb8da": {
+ "path": "generated-edge-simstep-7874c48f-39d8-460e-9179-6a4082441eb0-e9f0e552-cd4a-4e87-9aef-5732c9ceb8da",
+ "fileName": "display-result.ts",
+ "cellName": "Output to Console",
+ "cellId": "e9f0e552-cd4a-4e87-9aef-5732c9ceb8da",
+ "visible": true,
+ "startLine": 119,
+ "endLine": 119,
+ "parentPath": "src/lib/formatters/test/display-result.ts"
+ },
+ "50fba5a7-be9e-4088-95d8-acf055b8f600": {
+ "path": "50fba5a7-be9e-4088-95d8-acf055b8f600",
+ "cellName": "sast",
+ "cellId": "50fba5a7-be9e-4088-95d8-acf055b8f600",
+ "visible": true,
+ "parentCellId": "4284ceb3-32e6-4844-b503-52766f741796"
+ },
+ "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b": {
+ "path": "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b",
+ "cellName": "index.ts",
+ "cellId": "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600"
+ },
+ "e88475f8-7204-4e16-a443-54617e08dd29": {
+ "path": "e88475f8-7204-4e16-a443-54617e08dd29",
+ "cellName": "settings.ts",
+ "cellId": "e88475f8-7204-4e16-a443-54617e08dd29",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600"
+ },
+ "9cee7e4e-4e60-4934-9b0a-eee48665dc9a": {
+ "path": "9cee7e4e-4e60-4934-9b0a-eee48665dc9a",
+ "cellName": "checks.ts",
+ "cellId": "9cee7e4e-4e60-4934-9b0a-eee48665dc9a",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600"
+ },
+ "a0484c96-2ffe-4b58-a41b-210662c289ec": {
+ "path": "a0484c96-2ffe-4b58-a41b-210662c289ec",
+ "cellName": "analysis.ts",
+ "cellId": "a0484c96-2ffe-4b58-a41b-210662c289ec",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600"
+ },
+ "85df9d5a-33e1-413b-ac31-8e6eda9f5517": {
+ "path": "85df9d5a-33e1-413b-ac31-8e6eda9f5517",
+ "cellName": "SAST: User executes `snyk code test` - index.ts:L31-47",
+ "cellId": "85df9d5a-33e1-413b-ac31-8e6eda9f5517",
+ "visible": true,
+ "parentCellId": "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b"
+ },
+ "src/lib/plugins/sast/index.ts-simstep-c8c7ee4e-8f17-4c1b-b813-d7f6d360e219": {
+ "path": "src/lib/plugins/sast/index.ts-simstep-c8c7ee4e-8f17-4c1b-b813-d7f6d360e219",
+ "fileName": "index.ts",
+ "wiki": "The user runs `snyk code test` against a local directory. The Snyk CLI identifies the 'code' command and dispatches it to the SAST plugin, which begins the testing process.",
+ "cellName": "SAST: User executes `snyk code test` - index.ts:L31-47",
+ "cellId": "85df9d5a-33e1-413b-ac31-8e6eda9f5517",
+ "visible": true,
+ "startLine": 31,
+ "endLine": 47,
+ "parentCellId": "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b",
+ "parentPath": "src/lib/plugins/sast/index.ts"
+ },
+ "87fdb414-03a7-4944-9350-b2227ddf3890": {
+ "path": "87fdb414-03a7-4944-9350-b2227ddf3890",
+ "cellName": "SAST: Fetch Organization Settings - settings.ts:L12-54",
+ "cellId": "87fdb414-03a7-4944-9350-b2227ddf3890",
+ "visible": true,
+ "parentCellId": "e88475f8-7204-4e16-a443-54617e08dd29"
+ },
+ "src/lib/plugins/sast/settings.ts-simstep-c6491e83-01e8-4cbe-b2b6-b7e276d682b0": {
+ "path": "src/lib/plugins/sast/settings.ts-simstep-c6491e83-01e8-4cbe-b2b6-b7e276d682b0",
+ "fileName": "settings.ts",
+ "wiki": "The SAST plugin checks if the Snyk Code feature is enabled for the user's organization by calling `getSastSettings`, which in turn makes an API request.",
+ "cellName": "SAST: Fetch Organization Settings - settings.ts:L12-54",
+ "cellId": "87fdb414-03a7-4944-9350-b2227ddf3890",
+ "visible": true,
+ "startLine": 12,
+ "endLine": 54,
+ "parentCellId": "e88475f8-7204-4e16-a443-54617e08dd29",
+ "parentPath": "src/lib/plugins/sast/settings.ts"
+ },
+ "8c73f142-d7e2-4413-a7e0-8eaa979d3af2": {
+ "path": "8c73f142-d7e2-4413-a7e0-8eaa979d3af2",
+ "cellName": "SAST: Process SAST Settings Response - settings.ts:L22-41",
+ "cellId": "8c73f142-d7e2-4413-a7e0-8eaa979d3af2",
+ "visible": true,
+ "parentCellId": "e88475f8-7204-4e16-a443-54617e08dd29"
+ },
+ "src/lib/plugins/sast/settings.ts-simstep-1cc334ad-bea1-456c-bbba-909a81ae0d19": {
+ "path": "src/lib/plugins/sast/settings.ts-simstep-1cc334ad-bea1-456c-bbba-909a81ae0d19",
+ "fileName": "settings.ts",
+ "wiki": "The API response is processed. The system verifies that Snyk Code is enabled (`sastEnabled: true`). If it's disabled or an auth error occurs, the process terminates with an error. Otherwise, it proceeds with the scan.",
+ "cellName": "SAST: Process SAST Settings Response - settings.ts:L22-41",
+ "cellId": "8c73f142-d7e2-4413-a7e0-8eaa979d3af2",
+ "visible": true,
+ "startLine": 22,
+ "endLine": 41,
+ "parentCellId": "e88475f8-7204-4e16-a443-54617e08dd29",
+ "parentPath": "src/lib/plugins/sast/settings.ts"
+ },
+ "04fe7483-0b7f-4d85-8c8c-d9a366db2cbf": {
+ "path": "04fe7483-0b7f-4d85-8c8c-d9a366db2cbf",
+ "cellName": "SAST: Initiate Code Analysis - analysis.ts:L58-74",
+ "cellId": "04fe7483-0b7f-4d85-8c8c-d9a366db2cbf",
+ "visible": true,
+ "parentCellId": "a0484c96-2ffe-4b58-a41b-210662c289ec"
+ },
+ "src/lib/plugins/sast/analysis.ts-simstep-dfab11fd-cca1-4915-9d98-c2d75f2de052": {
+ "path": "src/lib/plugins/sast/analysis.ts-simstep-dfab11fd-cca1-4915-9d98-c2d75f2de052",
+ "fileName": "analysis.ts",
+ "wiki": "The `getCodeTestResults` function begins the analysis process. It determines the Snyk Code engine URL (cloud or local) and prepares the parameters for the code client, which will bundle the local source files.",
+ "cellName": "SAST: Initiate Code Analysis - analysis.ts:L58-74",
+ "cellId": "04fe7483-0b7f-4d85-8c8c-d9a366db2cbf",
+ "visible": true,
+ "startLine": 58,
+ "endLine": 74,
+ "parentCellId": "a0484c96-2ffe-4b58-a41b-210662c289ec",
+ "parentPath": "src/lib/plugins/sast/analysis.ts"
+ },
+ "cb76c7a9-4204-4740-97ca-ecc0c0a0a792": {
+ "path": "cb76c7a9-4204-4740-97ca-ecc0c0a0a792",
+ "cellName": "SAST: Receive Analysis Results - analysis.ts:L119-134",
+ "cellId": "cb76c7a9-4204-4740-97ca-ecc0c0a0a792",
+ "visible": true,
+ "parentCellId": "a0484c96-2ffe-4b58-a41b-210662c289ec"
+ },
+ "src/lib/plugins/sast/analysis.ts-simstep-1b157776-e26a-436c-b8be-beac0236b64e": {
+ "path": "src/lib/plugins/sast/analysis.ts-simstep-1b157776-e26a-436c-b8be-beac0236b64e",
+ "fileName": "analysis.ts",
+ "wiki": "The CLI receives the analysis results from the Snyk Code engine in SARIF format, which includes vulnerability details, locations, and data flow information.",
+ "cellName": "SAST: Receive Analysis Results - analysis.ts:L119-134",
+ "cellId": "cb76c7a9-4204-4740-97ca-ecc0c0a0a792",
+ "visible": true,
+ "startLine": 119,
+ "endLine": 134,
+ "parentCellId": "a0484c96-2ffe-4b58-a41b-210662c289ec",
+ "parentPath": "src/lib/plugins/sast/analysis.ts"
+ },
+ "18f7762c-2b2c-4bab-94a2-54e30c2e4e76": {
+ "path": "18f7762c-2b2c-4bab-94a2-54e30c2e4e76",
+ "cellName": "SAST: Format Results for Display - index.ts:L61-73",
+ "cellId": "18f7762c-2b2c-4bab-94a2-54e30c2e4e76",
+ "visible": true,
+ "parentCellId": "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b"
+ },
+ "src/lib/plugins/sast/index.ts-simstep-f74a6059-bcdc-4780-ab4c-769a3d998f2b": {
+ "path": "src/lib/plugins/sast/index.ts-simstep-f74a6059-bcdc-4780-ab4c-769a3d998f2b",
+ "fileName": "index.ts",
+ "wiki": "The SARIF results are parsed and formatted into a human-readable summary for the terminal. It identifies the number of issues, their severities, and locations in the code. This step also handles different output formats like `--json` or `--sarif`.",
+ "cellName": "SAST: Format Results for Display - index.ts:L61-73",
+ "cellId": "18f7762c-2b2c-4bab-94a2-54e30c2e4e76",
+ "visible": true,
+ "startLine": 61,
+ "endLine": 73,
+ "parentCellId": "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b",
+ "parentPath": "src/lib/plugins/sast/index.ts"
+ },
+ "177732a8-44c1-43c8-9aea-0ad57b01bcb4": {
+ "path": "177732a8-44c1-43c8-9aea-0ad57b01bcb4",
+ "cellName": "SAST: Pass\nCommand Options\nto SAST\nPlugin",
+ "cellId": "177732a8-44c1-43c8-9aea-0ad57b01bcb4",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600"
+ },
+ "generated-edge-simstep-63237123-ae0f-470f-96d6-3b052b9cd0f6-177732a8-44c1-43c8-9aea-0ad57b01bcb4": {
+ "path": "generated-edge-simstep-63237123-ae0f-470f-96d6-3b052b9cd0f6-177732a8-44c1-43c8-9aea-0ad57b01bcb4",
+ "fileName": "index.ts",
+ "cellName": "SAST: Pass Command Options to SAST Plugin",
+ "cellId": "177732a8-44c1-43c8-9aea-0ad57b01bcb4",
+ "visible": true,
+ "startLine": 31,
+ "endLine": 31,
+ "parentPath": "src/lib/plugins/sast/index.ts"
+ },
+ "2bbd35f8-485b-4ceb-aefe-1772e697769f": {
+ "path": "2bbd35f8-485b-4ceb-aefe-1772e697769f",
+ "cellName": "SAST: API\nRequest for\nSAST Settings",
+ "cellId": "2bbd35f8-485b-4ceb-aefe-1772e697769f",
+ "visible": true,
+ "parentCellId": "e88475f8-7204-4e16-a443-54617e08dd29"
+ },
+ "generated-edge-simstep-7b420e67-b6ce-47b5-8b6f-038e61ed41e0-2bbd35f8-485b-4ceb-aefe-1772e697769f": {
+ "path": "generated-edge-simstep-7b420e67-b6ce-47b5-8b6f-038e61ed41e0-2bbd35f8-485b-4ceb-aefe-1772e697769f",
+ "fileName": "settings.ts",
+ "cellName": "SAST: API Request for SAST Settings",
+ "cellId": "2bbd35f8-485b-4ceb-aefe-1772e697769f",
+ "visible": true,
+ "startLine": 7,
+ "endLine": 18,
+ "parentPath": "src/lib/plugins/sast/settings.ts"
+ },
+ "a35395a4-8e8f-4da5-8359-e81bae502f3f": {
+ "path": "a35395a4-8e8f-4da5-8359-e81bae502f3f",
+ "cellName": "SAST: Pass\nSettings to\nAnalysis Logic",
+ "cellId": "a35395a4-8e8f-4da5-8359-e81bae502f3f",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600"
+ },
+ "generated-edge-simstep-e8e623c6-5a0c-4866-96c6-b47b3809f178-a35395a4-8e8f-4da5-8359-e81bae502f3f": {
+ "path": "generated-edge-simstep-e8e623c6-5a0c-4866-96c6-b47b3809f178-a35395a4-8e8f-4da5-8359-e81bae502f3f",
+ "fileName": "settings.ts",
+ "cellName": "SAST: Pass Settings to Analysis Logic",
+ "cellId": "a35395a4-8e8f-4da5-8359-e81bae502f3f",
+ "visible": true,
+ "startLine": 39,
+ "endLine": 45,
+ "parentPath": "src/lib/plugins/sast/settings.ts"
+ },
+ "a1226a0a-2e74-4cf3-985a-fdfa0d24ed97": {
+ "path": "a1226a0a-2e74-4cf3-985a-fdfa0d24ed97",
+ "cellName": "SAST: Send\nCode Bundle\nfor Analysis",
+ "cellId": "a1226a0a-2e74-4cf3-985a-fdfa0d24ed97",
+ "visible": true,
+ "parentCellId": "a0484c96-2ffe-4b58-a41b-210662c289ec"
+ },
+ "generated-edge-simstep-b0f4807f-8f39-44a3-9c8b-993baf55461b-a1226a0a-2e74-4cf3-985a-fdfa0d24ed97": {
+ "path": "generated-edge-simstep-b0f4807f-8f39-44a3-9c8b-993baf55461b-a1226a0a-2e74-4cf3-985a-fdfa0d24ed97",
+ "fileName": "analysis.ts",
+ "cellName": "SAST: Send Code Bundle for Analysis",
+ "cellId": "a1226a0a-2e74-4cf3-985a-fdfa0d24ed97",
+ "visible": true,
+ "startLine": 101,
+ "endLine": 117,
+ "parentPath": "src/lib/plugins/sast/analysis.ts"
+ },
+ "951b1618-6ff4-4130-9f0f-e269ca8e4157": {
+ "path": "951b1618-6ff4-4130-9f0f-e269ca8e4157",
+ "cellName": "SAST: Pass\nResults for\nFormatting",
+ "cellId": "951b1618-6ff4-4130-9f0f-e269ca8e4157",
+ "visible": true,
+ "parentCellId": "50fba5a7-be9e-4088-95d8-acf055b8f600"
+ },
+ "generated-edge-simstep-c1fac049-da64-4866-a03a-6e9146b341a2-951b1618-6ff4-4130-9f0f-e269ca8e4157": {
+ "path": "generated-edge-simstep-c1fac049-da64-4866-a03a-6e9146b341a2-951b1618-6ff4-4130-9f0f-e269ca8e4157",
+ "fileName": "analysis.ts",
+ "cellName": "SAST: Pass Results for Formatting",
+ "cellId": "951b1618-6ff4-4130-9f0f-e269ca8e4157",
+ "visible": true,
+ "startLine": 39,
+ "endLine": 45,
+ "parentPath": "src/lib/plugins/sast/analysis.ts"
+ },
+ "ab974bc6-ca88-45c9-8636-80e7b4a5030f": {
+ "path": "ab974bc6-ca88-45c9-8636-80e7b4a5030f",
+ "cellName": "ecosystems",
+ "cellId": "ab974bc6-ca88-45c9-8636-80e7b4a5030f",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "ce22a7aa-f9c5-4b6b-ad6f-8e90757ec83a": {
+ "path": "ce22a7aa-f9c5-4b6b-ad6f-8e90757ec83a",
+ "cellName": "monitor",
+ "cellId": "ce22a7aa-f9c5-4b6b-ad6f-8e90757ec83a",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "865fb20e-d26a-406b-9f19-9767d9f3234b": {
+ "path": "865fb20e-d26a-406b-9f19-9767d9f3234b",
+ "cellName": "request",
+ "cellId": "865fb20e-d26a-406b-9f19-9767d9f3234b",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "6639eeef-9194-4245-b9de-bb192b75d570": {
+ "path": "6639eeef-9194-4245-b9de-bb192b75d570",
+ "cellName": "monitor",
+ "cellId": "6639eeef-9194-4245-b9de-bb192b75d570",
+ "visible": true,
+ "parentCellId": "7e45be32-f81c-4968-bfbe-7d29120ae0ca"
+ },
+ "9c6c0334-4bb3-4ed9-9c29-e9973dddb165": {
+ "path": "9c6c0334-4bb3-4ed9-9c29-e9973dddb165",
+ "cellName": "monitor.ts",
+ "cellId": "9c6c0334-4bb3-4ed9-9c29-e9973dddb165",
+ "visible": true,
+ "parentCellId": "ab974bc6-ca88-45c9-8636-80e7b4a5030f"
+ },
+ "9948c60b-5daa-47a7-ad88-9c3794596bd9": {
+ "path": "9948c60b-5daa-47a7-ad88-9c3794596bd9",
+ "cellName": "index.ts",
+ "cellId": "9948c60b-5daa-47a7-ad88-9c3794596bd9",
+ "visible": true,
+ "parentCellId": "ce22a7aa-f9c5-4b6b-ad6f-8e90757ec83a"
+ },
+ "bf9c39ae-73d3-440c-9f52-9b084099d09d": {
+ "path": "bf9c39ae-73d3-440c-9f52-9b084099d09d",
+ "cellName": "promise.ts",
+ "cellId": "bf9c39ae-73d3-440c-9f52-9b084099d09d",
+ "visible": true,
+ "parentCellId": "865fb20e-d26a-406b-9f19-9767d9f3234b"
+ },
+ "d62c84cb-9c2b-4738-9edc-2dce8a3941fb": {
+ "path": "d62c84cb-9c2b-4738-9edc-2dce8a3941fb",
+ "cellName": "format-monitor-response.ts",
+ "cellId": "d62c84cb-9c2b-4738-9edc-2dce8a3941fb",
+ "visible": true,
+ "parentCellId": "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924"
+ },
+ "129e820f-d9fc-4629-8f71-ab98afacd790": {
+ "path": "129e820f-d9fc-4629-8f71-ab98afacd790",
+ "cellName": "index.ts",
+ "cellId": "129e820f-d9fc-4629-8f71-ab98afacd790",
+ "visible": true,
+ "parentCellId": "6639eeef-9194-4245-b9de-bb192b75d570"
+ },
+ "8fe34504-b3ce-431c-9ced-38245c77cfc3": {
+ "path": "8fe34504-b3ce-431c-9ced-38245c77cfc3",
+ "cellName": "Command Invocation and Argument Parsing - index.ts:L36-234",
+ "cellId": "8fe34504-b3ce-431c-9ced-38245c77cfc3",
+ "visible": true,
+ "parentCellId": "129e820f-d9fc-4629-8f71-ab98afacd790"
+ },
+ "src/cli/commands/monitor/index.ts-simstep-8e548081-e285-47ef-85d6-4c08853749af": {
+ "path": "src/cli/commands/monitor/index.ts-simstep-8e548081-e285-47ef-85d6-4c08853749af",
+ "fileName": "index.ts",
+ "wiki": "The user runs the `snyk monitor` command from their terminal. The Snyk CLI parses the command, arguments, and flags (e.g., `--project-name`, `--org`) to create an options configuration object for the monitoring task.",
+ "cellName": "Command Invocation and Argument Parsing - index.ts:L36-234",
+ "cellId": "8fe34504-b3ce-431c-9ced-38245c77cfc3",
+ "visible": true,
+ "startLine": 36,
+ "endLine": 234,
+ "parentCellId": "129e820f-d9fc-4629-8f71-ab98afacd790",
+ "parentPath": "src/cli/commands/monitor/index.ts"
+ },
+ "d82ce01e-7a3d-4a59-92af-163333afbe4d": {
+ "path": "d82ce01e-7a3d-4a59-92af-163333afbe4d",
+ "cellName": "Ecosystem Detection and Strategy Selection - index.ts:L169-177",
+ "cellId": "d82ce01e-7a3d-4a59-92af-163333afbe4d",
+ "visible": true,
+ "parentCellId": "129e820f-d9fc-4629-8f71-ab98afacd790"
+ },
+ "src/cli/commands/monitor/index.ts-simstep-b5623c1f-924f-4354-8f6c-df35c322664a": {
+ "path": "src/cli/commands/monitor/index.ts-simstep-b5623c1f-924f-4354-8f6c-df35c322664a",
+ "fileName": "index.ts",
+ "wiki": "The CLI determines the project's ecosystem (e.g., npm, maven, docker) based on the files present and the command-line options. It then selects the modern 'ecosystem' monitoring strategy if applicable.",
+ "cellName": "Ecosystem Detection and Strategy Selection - index.ts:L169-177",
+ "cellId": "d82ce01e-7a3d-4a59-92af-163333afbe4d",
+ "visible": true,
+ "startLine": 169,
+ "endLine": 177,
+ "parentCellId": "129e820f-d9fc-4629-8f71-ab98afacd790",
+ "parentPath": "src/cli/commands/monitor/index.ts"
+ },
+ "9b0f24f6-1620-4ac6-9d9e-855fef646f5d": {
+ "path": "9b0f24f6-1620-4ac6-9d9e-855fef646f5d",
+ "cellName": "Project Dependency Scanning - monitor.ts:L46-56",
+ "cellId": "9b0f24f6-1620-4ac6-9d9e-855fef646f5d",
+ "visible": true,
+ "parentCellId": "9c6c0334-4bb3-4ed9-9c29-e9973dddb165"
+ },
+ "src/lib/ecosystems/monitor.ts-simstep-af23c831-dab9-4d0a-8c29-b9d8a4015949": {
+ "path": "src/lib/ecosystems/monitor.ts-simstep-af23c831-dab9-4d0a-8c29-b9d8a4015949",
+ "fileName": "monitor.ts",
+ "wiki": "The `monitorEcosystem` function uses a plugin specific to the detected ecosystem (e.g., 'npm') to scan the project. The plugin reads manifest files (like package.json and package-lock.json), resolves all dependencies, and builds a complete dependency graph.",
+ "cellName": "Project Dependency Scanning - monitor.ts:L46-56",
+ "cellId": "9b0f24f6-1620-4ac6-9d9e-855fef646f5d",
+ "visible": true,
+ "startLine": 46,
+ "endLine": 56,
+ "parentCellId": "9c6c0334-4bb3-4ed9-9c29-e9973dddb165",
+ "parentPath": "src/lib/ecosystems/monitor.ts"
+ },
+ "c199f3ac-935a-40f2-8343-2fe978313083": {
+ "path": "c199f3ac-935a-40f2-8343-2fe978313083",
+ "cellName": "Send Project Snapshot to Snyk API - index.ts:L39-82",
+ "cellId": "c199f3ac-935a-40f2-8343-2fe978313083",
+ "visible": true,
+ "parentCellId": "9948c60b-5daa-47a7-ad88-9c3794596bd9"
+ },
+ "src/lib/monitor/index.ts-simstep-eaff140f-6c07-403b-bc5c-d97849b3cafe": {
+ "path": "src/lib/monitor/index.ts-simstep-eaff140f-6c07-403b-bc5c-d97849b3cafe",
+ "fileName": "index.ts",
+ "wiki": "A JSON payload, representing the project's snapshot (including the dependency graph, metadata, and any applicable policies), is created. This payload is then sent to the Snyk API's `/monitor-dependencies` endpoint via an authenticated PUT request.",
+ "cellName": "Send Project Snapshot to Snyk API - index.ts:L39-82",
+ "cellId": "c199f3ac-935a-40f2-8343-2fe978313083",
+ "visible": true,
+ "startLine": 39,
+ "endLine": 82,
+ "parentCellId": "9948c60b-5daa-47a7-ad88-9c3794596bd9",
+ "parentPath": "src/lib/monitor/index.ts"
+ },
+ "a61594f2-05b5-45b3-b9d9-6a0ea230d609": {
+ "path": "a61594f2-05b5-45b3-b9d9-6a0ea230d609",
+ "cellName": "Display Monitoring Confirmation - format-monitor-response.ts:L71-103",
+ "cellId": "a61594f2-05b5-45b3-b9d9-6a0ea230d609",
+ "visible": true,
+ "parentCellId": "d62c84cb-9c2b-4738-9edc-2dce8a3941fb"
+ },
+ "src/lib/formatters/format-monitor-response.ts-simstep-6062ce68-9179-4264-91df-59ba447d3e89": {
+ "path": "src/lib/formatters/format-monitor-response.ts-simstep-6062ce68-9179-4264-91df-59ba447d3e89",
+ "fileName": "format-monitor-response.ts",
+ "wiki": "The CLI processes the successful API response and formats a confirmation message for the user. This message includes the link to the monitored project and confirms that Snyk will now continuously monitor the snapshot for new vulnerabilities.",
+ "cellName": "Display Monitoring Confirmation - format-monitor-response.ts:L71-103",
+ "cellId": "a61594f2-05b5-45b3-b9d9-6a0ea230d609",
+ "visible": true,
+ "startLine": 71,
+ "endLine": 103,
+ "parentCellId": "d62c84cb-9c2b-4738-9edc-2dce8a3941fb",
+ "parentPath": "src/lib/formatters/format-monitor-response.ts"
+ },
+ "807988de-deab-4338-8094-1db81b930e69": {
+ "path": "807988de-deab-4338-8094-1db81b930e69",
+ "cellName": "Configuration Transfer",
+ "cellId": "807988de-deab-4338-8094-1db81b930e69",
+ "visible": true,
+ "parentCellId": "129e820f-d9fc-4629-8f71-ab98afacd790"
+ },
+ "generated-edge-simstep-4d2ddc8d-56e1-4eea-b450-1e68aae83020-807988de-deab-4338-8094-1db81b930e69": {
+ "path": "generated-edge-simstep-4d2ddc8d-56e1-4eea-b450-1e68aae83020-807988de-deab-4338-8094-1db81b930e69",
+ "fileName": "index.ts",
+ "cellName": "Configuration Transfer",
+ "cellId": "807988de-deab-4338-8094-1db81b930e69",
+ "visible": true,
+ "startLine": 169,
+ "endLine": 169,
+ "parentPath": "src/cli/commands/monitor/index.ts"
+ },
+ "d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e": {
+ "path": "d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e",
+ "cellName": "Dispatch to\nEcosystem Monitor",
+ "cellId": "d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1"
+ },
+ "generated-edge-simstep-c1b18c29-d707-44ea-ad10-0fe16ce8be25-d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e": {
+ "path": "generated-edge-simstep-c1b18c29-d707-44ea-ad10-0fe16ce8be25-d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e",
+ "fileName": "index.ts",
+ "cellName": "Dispatch to Ecosystem Monitor",
+ "cellId": "d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e",
+ "visible": true,
+ "startLine": 171,
+ "endLine": 176,
+ "parentPath": "src/cli/commands/monitor/index.ts"
+ },
+ "a1d58d6c-4fa1-430e-aca9-8f02d067abad": {
+ "path": "a1d58d6c-4fa1-430e-aca9-8f02d067abad",
+ "cellName": "Transmit Scan\nResults for\nAPI Payload\nCreation",
+ "cellId": "a1d58d6c-4fa1-430e-aca9-8f02d067abad",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "generated-edge-simstep-6f80a0a6-5228-42ae-b48d-6c0b71e42af9-a1d58d6c-4fa1-430e-aca9-8f02d067abad": {
+ "path": "generated-edge-simstep-6f80a0a6-5228-42ae-b48d-6c0b71e42af9-a1d58d6c-4fa1-430e-aca9-8f02d067abad",
+ "fileName": "monitor.ts",
+ "cellName": "Transmit Scan Results for API Payload Creation",
+ "cellId": "a1d58d6c-4fa1-430e-aca9-8f02d067abad",
+ "visible": true,
+ "startLine": 84,
+ "endLine": 89,
+ "parentPath": "src/lib/ecosystems/monitor.ts"
+ },
+ "64d2e920-3c82-4a3d-ba11-d479500941f5": {
+ "path": "64d2e920-3c82-4a3d-ba11-d479500941f5",
+ "cellName": "Receive API\nConfirmation",
+ "cellId": "64d2e920-3c82-4a3d-ba11-d479500941f5",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "generated-edge-simstep-e1d5c936-b095-45da-b257-fd1f5e52af44-64d2e920-3c82-4a3d-ba11-d479500941f5": {
+ "path": "generated-edge-simstep-e1d5c936-b095-45da-b257-fd1f5e52af44-64d2e920-3c82-4a3d-ba11-d479500941f5",
+ "fileName": "index.ts",
+ "cellName": "Receive API Confirmation",
+ "cellId": "64d2e920-3c82-4a3d-ba11-d479500941f5",
+ "visible": true,
+ "startLine": 13,
+ "endLine": 28,
+ "parentPath": "src/lib/monitor/index.ts"
+ },
+ "4fb5aa03-806c-47d2-a809-54ed8897ebe1": {
+ "path": "4fb5aa03-806c-47d2-a809-54ed8897ebe1",
+ "cellName": "snyk-cli-b8d7f01",
+ "cellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1",
+ "visible": true,
+ "children": [
+ "snyk-cli-b8d7f01/src",
+ "snyk-cli-b8d7f01/packages",
+ "snyk-cli-b8d7f01/help",
+ "snyk-cli-b8d7f01/test"
+ ]
+ },
+ "snyk-cli-b8d7f01": {
+ "path": "snyk-cli-b8d7f01",
+ "fileName": "snyk-cli-b8d7f01",
+ "cellName": "snyk-cli-b8d7f01",
+ "cellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1",
+ "visible": true
+ },
+ "85cfde81-a717-45ef-8a87-7933eb33aaa4": {
+ "path": "85cfde81-a717-45ef-8a87-7933eb33aaa4",
+ "cellName": "src",
+ "cellId": "85cfde81-a717-45ef-8a87-7933eb33aaa4",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli",
+ "snyk-cli-b8d7f01/src/lib"
+ ]
+ },
+ "snyk-cli-b8d7f01/src": {
+ "path": "snyk-cli-b8d7f01/src",
+ "fileName": "src",
+ "cellName": "src",
+ "cellId": "85cfde81-a717-45ef-8a87-7933eb33aaa4",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1"
+ },
+ "08891fdc-0659-4fd0-b625-e59f5f616ade": {
+ "path": "08891fdc-0659-4fd0-b625-e59f5f616ade",
+ "cellName": "packages",
+ "cellId": "08891fdc-0659-4fd0-b625-e59f5f616ade",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages": {
+ "path": "snyk-cli-b8d7f01/packages",
+ "fileName": "packages",
+ "cellName": "packages",
+ "cellId": "08891fdc-0659-4fd0-b625-e59f5f616ade",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1"
+ },
+ "35b595f8-07a0-4381-8583-2864f74392cb": {
+ "path": "35b595f8-07a0-4381-8583-2864f74392cb",
+ "cellName": "cli",
+ "cellId": "35b595f8-07a0-4381-8583-2864f74392cb",
+ "visible": true,
+ "parentCellId": "85cfde81-a717-45ef-8a87-7933eb33aaa4",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands",
+ "snyk-cli-b8d7f01/src/cli/main.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli": {
+ "path": "snyk-cli-b8d7f01/src/cli",
+ "fileName": "cli",
+ "cellName": "cli",
+ "cellId": "35b595f8-07a0-4381-8583-2864f74392cb",
+ "visible": true,
+ "parentCellId": "85cfde81-a717-45ef-8a87-7933eb33aaa4"
+ },
+ "34fe8c31-16e2-49f9-90c4-8c441c030adf": {
+ "path": "34fe8c31-16e2-49f9-90c4-8c441c030adf",
+ "cellName": "snyk-fix",
+ "cellId": "34fe8c31-16e2-49f9-90c4-8c441c030adf",
+ "visible": true,
+ "parentCellId": "08891fdc-0659-4fd0-b625-e59f5f616ade",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix",
+ "fileName": "snyk-fix",
+ "cellName": "snyk-fix",
+ "cellId": "34fe8c31-16e2-49f9-90c4-8c441c030adf",
+ "visible": true,
+ "parentCellId": "08891fdc-0659-4fd0-b625-e59f5f616ade"
+ },
+ "53827863-cec6-4af5-a0c9-b4e71516e392": {
+ "path": "53827863-cec6-4af5-a0c9-b4e71516e392",
+ "cellName": "commands",
+ "cellId": "53827863-cec6-4af5-a0c9-b4e71516e392",
+ "visible": true,
+ "parentCellId": "35b595f8-07a0-4381-8583-2864f74392cb",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/fix",
+ "snyk-cli-b8d7f01/src/cli/commands/test",
+ "snyk-cli-b8d7f01/src/cli/commands/auth",
+ "snyk-cli-b8d7f01/src/cli/commands/types.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands",
+ "fileName": "commands",
+ "cellName": "commands",
+ "cellId": "53827863-cec6-4af5-a0c9-b4e71516e392",
+ "visible": true,
+ "parentCellId": "35b595f8-07a0-4381-8583-2864f74392cb"
+ },
+ "59e69954-918d-4917-bc2d-23e6829dc151": {
+ "path": "59e69954-918d-4917-bc2d-23e6829dc151",
+ "cellName": "src",
+ "cellId": "59e69954-918d-4917-bc2d-23e6829dc151",
+ "visible": true,
+ "parentCellId": "34fe8c31-16e2-49f9-90c4-8c441c030adf",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts",
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins",
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/lib"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src",
+ "fileName": "src",
+ "cellName": "src",
+ "cellId": "59e69954-918d-4917-bc2d-23e6829dc151",
+ "visible": true,
+ "parentCellId": "34fe8c31-16e2-49f9-90c4-8c441c030adf"
+ },
+ "1bd31dba-e628-45c2-b14d-ba7136d9fbc1": {
+ "path": "1bd31dba-e628-45c2-b14d-ba7136d9fbc1",
+ "cellName": "fix",
+ "cellId": "1bd31dba-e628-45c2-b14d-ba7136d9fbc1",
+ "visible": true,
+ "parentCellId": "53827863-cec6-4af5-a0c9-b4e71516e392",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts",
+ "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/fix": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/fix",
+ "fileName": "fix",
+ "cellName": "fix",
+ "cellId": "1bd31dba-e628-45c2-b14d-ba7136d9fbc1",
+ "visible": true,
+ "parentCellId": "53827863-cec6-4af5-a0c9-b4e71516e392"
+ },
+ "4c3e5d19-448e-4a7a-81ec-1ec31b8abd86": {
+ "path": "4c3e5d19-448e-4a7a-81ec-1ec31b8abd86",
+ "cellName": "index.ts",
+ "cellId": "4c3e5d19-448e-4a7a-81ec-1ec31b8abd86",
+ "visible": true,
+ "parentCellId": "59e69954-918d-4917-bc2d-23e6829dc151"
+ },
+ "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc": {
+ "path": "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc",
+ "cellName": "plugins",
+ "cellId": "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc",
+ "visible": true,
+ "parentCellId": "59e69954-918d-4917-bc2d-23e6829dc151",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts",
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins",
+ "fileName": "plugins",
+ "cellName": "plugins",
+ "cellId": "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc",
+ "visible": true,
+ "parentCellId": "59e69954-918d-4917-bc2d-23e6829dc151"
+ },
+ "9626e7a5-6521-4559-8b06-8fcc65641afe": {
+ "path": "9626e7a5-6521-4559-8b06-8fcc65641afe",
+ "cellName": "lib",
+ "cellId": "9626e7a5-6521-4559-8b06-8fcc65641afe",
+ "visible": true,
+ "parentCellId": "59e69954-918d-4917-bc2d-23e6829dc151",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/lib": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib",
+ "fileName": "lib",
+ "cellName": "lib",
+ "cellId": "9626e7a5-6521-4559-8b06-8fcc65641afe",
+ "visible": true,
+ "parentCellId": "59e69954-918d-4917-bc2d-23e6829dc151"
+ },
+ "0ad50987-c84c-4ac4-97c6-f63728ed3520": {
+ "path": "0ad50987-c84c-4ac4-97c6-f63728ed3520",
+ "cellName": "validate-fix-command-is-supported.ts",
+ "cellId": "0ad50987-c84c-4ac4-97c6-f63728ed3520",
+ "visible": true,
+ "parentCellId": "1bd31dba-e628-45c2-b14d-ba7136d9fbc1"
+ },
+ "58c1e862-ffc7-4a03-8a44-e607d59662db": {
+ "path": "58c1e862-ffc7-4a03-8a44-e607d59662db",
+ "cellName": "index.ts",
+ "cellId": "58c1e862-ffc7-4a03-8a44-e607d59662db",
+ "visible": true,
+ "parentCellId": "1bd31dba-e628-45c2-b14d-ba7136d9fbc1"
+ },
+ "a4f86384-1372-48c7-b952-39891002f67e": {
+ "path": "a4f86384-1372-48c7-b952-39891002f67e",
+ "cellName": "load-plugin.ts",
+ "cellId": "a4f86384-1372-48c7-b952-39891002f67e",
+ "visible": true,
+ "parentCellId": "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc"
+ },
+ "62c7871e-53a6-49eb-9bf9-417a92c06e17": {
+ "path": "62c7871e-53a6-49eb-9bf9-417a92c06e17",
+ "cellName": "python",
+ "cellId": "62c7871e-53a6-49eb-9bf9-417a92c06e17",
+ "visible": true,
+ "parentCellId": "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/index.ts",
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python",
+ "fileName": "python",
+ "cellName": "python",
+ "cellId": "62c7871e-53a6-49eb-9bf9-417a92c06e17",
+ "visible": true,
+ "parentCellId": "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc"
+ },
+ "1984c9cc-b2ee-440a-8935-d0208207f4cc": {
+ "path": "1984c9cc-b2ee-440a-8935-d0208207f4cc",
+ "cellName": "output-formatters",
+ "cellId": "1984c9cc-b2ee-440a-8935-d0208207f4cc",
+ "visible": true,
+ "parentCellId": "9626e7a5-6521-4559-8b06-8fcc65641afe",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters",
+ "fileName": "output-formatters",
+ "cellName": "output-formatters",
+ "cellId": "1984c9cc-b2ee-440a-8935-d0208207f4cc",
+ "visible": true,
+ "parentCellId": "9626e7a5-6521-4559-8b06-8fcc65641afe"
+ },
+ "21cb1ec8-b5c9-4be8-a30a-430e85371b2a": {
+ "path": "21cb1ec8-b5c9-4be8-a30a-430e85371b2a",
+ "cellName": "index.ts",
+ "cellId": "21cb1ec8-b5c9-4be8-a30a-430e85371b2a",
+ "visible": true,
+ "parentCellId": "62c7871e-53a6-49eb-9bf9-417a92c06e17"
+ },
+ "325dda18-c554-4a57-b6dc-7dd262382f93": {
+ "path": "325dda18-c554-4a57-b6dc-7dd262382f93",
+ "cellName": "handlers",
+ "cellId": "325dda18-c554-4a57-b6dc-7dd262382f93",
+ "visible": true,
+ "parentCellId": "62c7871e-53a6-49eb-9bf9-417a92c06e17",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers",
+ "fileName": "handlers",
+ "cellName": "handlers",
+ "cellId": "325dda18-c554-4a57-b6dc-7dd262382f93",
+ "visible": true,
+ "parentCellId": "62c7871e-53a6-49eb-9bf9-417a92c06e17"
+ },
+ "bc7bd2a2-93a3-4672-9b1d-966a0898cb62": {
+ "path": "bc7bd2a2-93a3-4672-9b1d-966a0898cb62",
+ "cellName": "show-results-summary.ts",
+ "cellId": "bc7bd2a2-93a3-4672-9b1d-966a0898cb62",
+ "visible": true,
+ "parentCellId": "1984c9cc-b2ee-440a-8935-d0208207f4cc"
+ },
+ "0f465fbf-3267-4774-9abf-c1b748d9552a": {
+ "path": "0f465fbf-3267-4774-9abf-c1b748d9552a",
+ "cellName": "pip-requirements",
+ "cellId": "0f465fbf-3267-4774-9abf-c1b748d9552a",
+ "visible": true,
+ "parentCellId": "325dda18-c554-4a57-b6dc-7dd262382f93",
+ "children": [
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements",
+ "fileName": "pip-requirements",
+ "cellName": "pip-requirements",
+ "cellId": "0f465fbf-3267-4774-9abf-c1b748d9552a",
+ "visible": true,
+ "parentCellId": "325dda18-c554-4a57-b6dc-7dd262382f93"
+ },
+ "88671fb5-68ef-4480-9cd9-e901d9d57f4a": {
+ "path": "88671fb5-68ef-4480-9cd9-e901d9d57f4a",
+ "cellName": "index.ts",
+ "cellId": "88671fb5-68ef-4480-9cd9-e901d9d57f4a",
+ "visible": true,
+ "parentCellId": "0f465fbf-3267-4774-9abf-c1b748d9552a"
+ },
+ "49e8d2e5-66a9-4da4-8dd6-29c384c4e617": {
+ "path": "49e8d2e5-66a9-4da4-8dd6-29c384c4e617",
+ "cellName": "Command Validation: Check Feature Support - validate-fix-command-is-supported.ts:L13-27",
+ "cellId": "49e8d2e5-66a9-4da4-8dd6-29c384c4e617",
+ "visible": true,
+ "parentCellId": "0ad50987-c84c-4ac4-97c6-f63728ed3520"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts-simstep-574dabd8-20ff-4005-bc6e-2b5c32e69c51": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts-simstep-574dabd8-20ff-4005-bc6e-2b5c32e69c51",
+ "fileName": "validate-fix-command-is-supported.ts",
+ "wiki": "The user runs `snyk fix`. The CLI first validates if the `snyk fix` feature is enabled for the user's organization by checking the `cliSnykFix` feature flag. This step ensures that the command can proceed before performing any intensive operations like scanning.",
+ "cellName": "Command Validation: Check Feature Support - validate-fix-command-is-supported.ts:L13-27",
+ "cellId": "49e8d2e5-66a9-4da4-8dd6-29c384c4e617",
+ "visible": true,
+ "startLine": 13,
+ "endLine": 27,
+ "parentCellId": "0ad50987-c84c-4ac4-97c6-f63728ed3520",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts"
+ },
+ "faaedbc4-41ce-4a24-a3c3-f1ba22372a33": {
+ "path": "faaedbc4-41ce-4a24-a3c3-f1ba22372a33",
+ "cellName": "Vulnerability Scanning - index.ts:L46",
+ "cellId": "faaedbc4-41ce-4a24-a3c3-f1ba22372a33",
+ "visible": true,
+ "parentCellId": "58c1e862-ffc7-4a03-8a44-e607d59662db"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts-simstep-73da6b68-0a68-4c57-8933-f8fa56819537": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts-simstep-73da6b68-0a68-4c57-8933-f8fa56819537",
+ "fileName": "index.ts",
+ "wiki": "The CLI executes a vulnerability scan, similar to `snyk test`, on the specified paths to identify vulnerabilities and their potential remediations. The results are collected into a list of entities that need to be fixed.",
+ "cellName": "Vulnerability Scanning - index.ts:L46",
+ "cellId": "faaedbc4-41ce-4a24-a3c3-f1ba22372a33",
+ "visible": true,
+ "startLine": 46,
+ "endLine": 46,
+ "parentCellId": "58c1e862-ffc7-4a03-8a44-e607d59662db",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts"
+ },
+ "018b111a-f6be-49f3-99e0-83ed5baf6097": {
+ "path": "018b111a-f6be-49f3-99e0-83ed5baf6097",
+ "cellName": "Partition and Group Entities - index.ts:L43-45",
+ "cellId": "018b111a-f6be-49f3-99e0-83ed5baf6097",
+ "visible": true,
+ "parentCellId": "4c3e5d19-448e-4a7a-81ec-1ec31b8abd86"
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts-simstep-e3655bbf-11b4-4582-8454-2ee3da1bfda1": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts-simstep-e3655bbf-11b4-4582-8454-2ee3da1bfda1",
+ "fileName": "index.ts",
+ "wiki": "Inside the `@snyk/fix` package, the list of vulnerable items is first partitioned to separate fixable from non-fixable items. Then, the fixable items are grouped by their ecosystem or scan type (e.g., 'pip', 'npm') to be processed by the appropriate plugin.",
+ "cellName": "Partition and Group Entities - index.ts:L43-45",
+ "cellId": "018b111a-f6be-49f3-99e0-83ed5baf6097",
+ "visible": true,
+ "startLine": 43,
+ "endLine": 45,
+ "parentCellId": "4c3e5d19-448e-4a7a-81ec-1ec31b8abd86",
+ "parentPath": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts"
+ },
+ "bc55c7f8-629c-4721-9afc-2c3f61ae5528": {
+ "path": "bc55c7f8-629c-4721-9afc-2c3f61ae5528",
+ "cellName": "Load Ecosystem-Specific Plugin - load-plugin.ts:L5-9",
+ "cellId": "bc55c7f8-629c-4721-9afc-2c3f61ae5528",
+ "visible": true,
+ "parentCellId": "a4f86384-1372-48c7-b952-39891002f67e"
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts-simstep-56eb6e35-443f-4a6c-8652-3440950fda43": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts-simstep-56eb6e35-443f-4a6c-8652-3440950fda43",
+ "fileName": "load-plugin.ts",
+ "wiki": "For each ecosystem (e.g., 'pip'), a specific plugin is loaded. This plugin contains the logic for handling that ecosystem's package managers and manifest files.",
+ "cellName": "Load Ecosystem-Specific Plugin - load-plugin.ts:L5-9",
+ "cellId": "bc55c7f8-629c-4721-9afc-2c3f61ae5528",
+ "visible": true,
+ "startLine": 5,
+ "endLine": 9,
+ "parentCellId": "a4f86384-1372-48c7-b952-39891002f67e",
+ "parentPath": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts"
+ },
+ "5025a11b-ad74-43be-8412-41019cd2b517": {
+ "path": "5025a11b-ad74-43be-8412-41019cd2b517",
+ "cellName": "Apply Fixes via Manifest Handler - index.ts:L32-59",
+ "cellId": "5025a11b-ad74-43be-8412-41019cd2b517",
+ "visible": true,
+ "parentCellId": "88671fb5-68ef-4480-9cd9-e901d9d57f4a"
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts-simstep-2f0287d8-5b84-4ea8-8592-a8bcac01e1d7": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts-simstep-2f0287d8-5b84-4ea8-8592-a8bcac01e1d7",
+ "fileName": "index.ts",
+ "wiki": "The Python plugin delegates the fixing logic to a specific handler based on the manifest file type, such as `pipRequirementsTxt` for `requirements.txt`. This handler reads the manifest, calculates the dependency upgrades or pins, and applies them. If not a dry run, it writes the changes back to the file.",
+ "cellName": "Apply Fixes via Manifest Handler - index.ts:L32-59",
+ "cellId": "5025a11b-ad74-43be-8412-41019cd2b517",
+ "visible": true,
+ "startLine": 32,
+ "endLine": 59,
+ "parentCellId": "88671fb5-68ef-4480-9cd9-e901d9d57f4a",
+ "parentPath": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts"
+ },
+ "b09b8c9b-af43-4757-9b7f-c479c2d39cbd": {
+ "path": "b09b8c9b-af43-4757-9b7f-c479c2d39cbd",
+ "cellName": "Generate Overall Summary - show-results-summary.ts:L123-129",
+ "cellId": "b09b8c9b-af43-4757-9b7f-c479c2d39cbd",
+ "visible": true,
+ "parentCellId": "bc7bd2a2-93a3-4672-9b1d-966a0898cb62"
+ },
+ "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts-simstep-d93d1e26-1f42-4436-b8bd-871ef289ebaa": {
+ "path": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts-simstep-d93d1e26-1f42-4436-b8bd-871ef289ebaa",
+ "fileName": "show-results-summary.ts",
+ "wiki": "After all plugins have run, the aggregated results are passed to an output formatter. This formatter calculates statistics like the number of fixed projects, failed attempts, and total issues addressed.",
+ "cellName": "Generate Overall Summary - show-results-summary.ts:L123-129",
+ "cellId": "b09b8c9b-af43-4757-9b7f-c479c2d39cbd",
+ "visible": true,
+ "startLine": 123,
+ "endLine": 129,
+ "parentCellId": "bc7bd2a2-93a3-4672-9b1d-966a0898cb62",
+ "parentPath": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts"
+ },
+ "3082770f-9af1-4edf-b6ce-7c1011a37030": {
+ "path": "3082770f-9af1-4edf-b6ce-7c1011a37030",
+ "cellName": "Display Results and Exit - index.ts:L169-177",
+ "cellId": "3082770f-9af1-4edf-b6ce-7c1011a37030",
+ "visible": true,
+ "parentCellId": "58c1e862-ffc7-4a03-8a44-e607d59662db"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts-simstep-d86c37d2-95f9-40ce-aa4e-626595032e96": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts-simstep-d86c37d2-95f9-40ce-aa4e-626595032e96",
+ "fileName": "index.ts",
+ "wiki": "The CLI command receives the final summary string and prints it to the standard output for the user to see. It also sends analytics about the fix operation and exits with an appropriate status code.",
+ "cellName": "Display Results and Exit - index.ts:L169-177",
+ "cellId": "3082770f-9af1-4edf-b6ce-7c1011a37030",
+ "visible": true,
+ "startLine": 169,
+ "endLine": 177,
+ "parentCellId": "58c1e862-ffc7-4a03-8a44-e607d59662db",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts"
+ },
+ "5f83b817-b895-4237-8c3c-64703a0aaa0b": {
+ "path": "5f83b817-b895-4237-8c3c-64703a0aaa0b",
+ "cellName": "Validation Success",
+ "cellId": "5f83b817-b895-4237-8c3c-64703a0aaa0b",
+ "visible": true,
+ "parentCellId": "1bd31dba-e628-45c2-b14d-ba7136d9fbc1"
+ },
+ "generated-edge-simstep-ec0fd951-34ae-4ac7-a3d0-f110f3fc869a-5f83b817-b895-4237-8c3c-64703a0aaa0b": {
+ "path": "generated-edge-simstep-ec0fd951-34ae-4ac7-a3d0-f110f3fc869a-5f83b817-b895-4237-8c3c-64703a0aaa0b",
+ "fileName": "validate-fix-command-is-supported.ts",
+ "cellName": "Validation Success",
+ "cellId": "5f83b817-b895-4237-8c3c-64703a0aaa0b",
+ "visible": true,
+ "startLine": 45,
+ "endLine": 53,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts"
+ },
+ "b235583a-957b-41e0-b5e8-4e4ff4c02198": {
+ "path": "b235583a-957b-41e0-b5e8-4e4ff4c02198",
+ "cellName": "Pass Vulnerable\nEntities to\nFix Engine",
+ "cellId": "b235583a-957b-41e0-b5e8-4e4ff4c02198",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1"
+ },
+ "generated-edge-simstep-00d221b5-1fbe-48d5-bb0b-dac917d76b76-b235583a-957b-41e0-b5e8-4e4ff4c02198": {
+ "path": "generated-edge-simstep-00d221b5-1fbe-48d5-bb0b-dac917d76b76-b235583a-957b-41e0-b5e8-4e4ff4c02198",
+ "fileName": "index.ts",
+ "cellName": "Pass Vulnerable Entities to Fix Engine",
+ "cellId": "b235583a-957b-41e0-b5e8-4e4ff4c02198",
+ "visible": true,
+ "startLine": 57,
+ "endLine": 62,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts"
+ },
+ "92c113ad-5fc9-40c8-a1a5-9ee559639783": {
+ "path": "92c113ad-5fc9-40c8-a1a5-9ee559639783",
+ "cellName": "Route Entities\nto Plugins",
+ "cellId": "92c113ad-5fc9-40c8-a1a5-9ee559639783",
+ "visible": true,
+ "parentCellId": "59e69954-918d-4917-bc2d-23e6829dc151"
+ },
+ "generated-edge-simstep-e2a7e0a1-9d99-4f16-ae1e-38050efcc40f-92c113ad-5fc9-40c8-a1a5-9ee559639783": {
+ "path": "generated-edge-simstep-e2a7e0a1-9d99-4f16-ae1e-38050efcc40f-92c113ad-5fc9-40c8-a1a5-9ee559639783",
+ "fileName": "index.ts",
+ "cellName": "Route Entities to Plugins",
+ "cellId": "92c113ad-5fc9-40c8-a1a5-9ee559639783",
+ "visible": true,
+ "startLine": 51,
+ "endLine": 51,
+ "parentPath": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts"
+ },
+ "9f186d49-1651-4bc8-bf03-e52f6f5f0308": {
+ "path": "9f186d49-1651-4bc8-bf03-e52f6f5f0308",
+ "cellName": "Invoke Python\nPlugin",
+ "cellId": "9f186d49-1651-4bc8-bf03-e52f6f5f0308",
+ "visible": true,
+ "parentCellId": "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc"
+ },
+ "generated-edge-simstep-1a7306ec-1588-4a84-8317-aa2c1fef3358-9f186d49-1651-4bc8-bf03-e52f6f5f0308": {
+ "path": "generated-edge-simstep-1a7306ec-1588-4a84-8317-aa2c1fef3358-9f186d49-1651-4bc8-bf03-e52f6f5f0308",
+ "fileName": "load-plugin.ts",
+ "cellName": "Invoke Python Plugin",
+ "cellId": "9f186d49-1651-4bc8-bf03-e52f6f5f0308",
+ "visible": true,
+ "startLine": 16,
+ "endLine": 29,
+ "parentPath": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts"
+ },
+ "28407214-e4ff-4556-96be-b831fdcba4dd": {
+ "path": "28407214-e4ff-4556-96be-b831fdcba4dd",
+ "cellName": "Return Fix\nResults",
+ "cellId": "28407214-e4ff-4556-96be-b831fdcba4dd",
+ "visible": true,
+ "parentCellId": "59e69954-918d-4917-bc2d-23e6829dc151"
+ },
+ "generated-edge-simstep-9d10714d-6924-4353-a0d2-c89e006821b9-28407214-e4ff-4556-96be-b831fdcba4dd": {
+ "path": "generated-edge-simstep-9d10714d-6924-4353-a0d2-c89e006821b9-28407214-e4ff-4556-96be-b831fdcba4dd",
+ "fileName": "index.ts",
+ "cellName": "Return Fix Results",
+ "cellId": "28407214-e4ff-4556-96be-b831fdcba4dd",
+ "visible": true,
+ "startLine": 59,
+ "endLine": 59,
+ "parentPath": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts"
+ },
+ "39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077": {
+ "path": "39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077",
+ "cellName": "Return Formatted\nSummary to\nCLI",
+ "cellId": "39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1"
+ },
+ "generated-edge-simstep-8c1875f0-728a-49ae-a31b-6d4bc8c94673-39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077": {
+ "path": "generated-edge-simstep-8c1875f0-728a-49ae-a31b-6d4bc8c94673-39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077",
+ "fileName": "show-results-summary.ts",
+ "cellName": "Return Formatted Summary to CLI",
+ "cellId": "39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077",
+ "visible": true,
+ "startLine": 62,
+ "endLine": 62,
+ "parentPath": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts"
+ },
+ "642b90fd-b953-4d96-94af-68ff69427e75": {
+ "path": "642b90fd-b953-4d96-94af-68ff69427e75",
+ "cellName": "assemble-payloads.ts",
+ "cellId": "642b90fd-b953-4d96-94af-68ff69427e75",
+ "visible": true,
+ "parentCellId": "0d44f382-7f12-4d1a-a845-6414b66ff034"
+ },
+ "00667f37-a3a9-468d-8372-1d2395fe3133": {
+ "path": "00667f37-a3a9-468d-8372-1d2395fe3133",
+ "cellName": "plugins.ts",
+ "cellId": "00667f37-a3a9-468d-8372-1d2395fe3133",
+ "visible": true,
+ "parentCellId": "ab974bc6-ca88-45c9-8636-80e7b4a5030f"
+ },
+ "17dee647-c7e6-4342-8c36-e73289cf6d7c": {
+ "path": "17dee647-c7e6-4342-8c36-e73289cf6d7c",
+ "cellName": "Command Execution - index.ts:L112-120",
+ "cellId": "17dee647-c7e6-4342-8c36-e73289cf6d7c",
+ "visible": true,
+ "parentCellId": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56"
+ },
+ "src/cli/commands/test/index.ts-simstep-587a712f-f06c-4356-9789-ecfbe1f45384": {
+ "path": "src/cli/commands/test/index.ts-simstep-587a712f-f06c-4356-9789-ecfbe1f45384",
+ "fileName": "index.ts",
+ "wiki": "The user executes the `snyk container test ` command. The CLI argument parser identifies `container` as a mode that enables the `--docker` flag and `test` as the command.",
+ "cellName": "Command Execution - index.ts:L112-120",
+ "cellId": "17dee647-c7e6-4342-8c36-e73289cf6d7c",
+ "visible": true,
+ "startLine": 112,
+ "endLine": 120,
+ "parentCellId": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56",
+ "parentPath": "src/cli/commands/test/index.ts"
+ },
+ "950404fa-f4bb-4054-9691-5ad1fa8a51d7": {
+ "path": "950404fa-f4bb-4054-9691-5ad1fa8a51d7",
+ "cellName": "Ecosystem Test Execution - run-test.ts:L592-600",
+ "cellId": "950404fa-f4bb-4054-9691-5ad1fa8a51d7",
+ "visible": true,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61"
+ },
+ "src/lib/snyk-test/run-test.ts-simstep-7c6a3c19-c15b-4314-bc8e-c95d466b9df8": {
+ "path": "src/lib/snyk-test/run-test.ts-simstep-7c6a3c19-c15b-4314-bc8e-c95d466b9df8",
+ "fileName": "run-test.ts",
+ "wiki": "The `runTest` function is invoked. It identifies the ecosystem as 'docker' and calls `assembleEcosystemPayloads` to begin the scanning process using the appropriate plugin.",
+ "cellName": "Ecosystem Test Execution - run-test.ts:L592-600",
+ "cellId": "950404fa-f4bb-4054-9691-5ad1fa8a51d7",
+ "visible": true,
+ "startLine": 592,
+ "endLine": 600,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61",
+ "parentPath": "src/lib/snyk-test/run-test.ts"
+ },
+ "67b965d1-eb5f-4758-af6b-eb5194ddb55a": {
+ "path": "67b965d1-eb5f-4758-af6b-eb5194ddb55a",
+ "cellName": "Image Inspection by Plugin - plugins.ts:L12",
+ "cellId": "67b965d1-eb5f-4758-af6b-eb5194ddb55a",
+ "visible": true,
+ "parentCellId": "00667f37-a3a9-468d-8372-1d2395fe3133"
+ },
+ "src/lib/ecosystems/plugins.ts-simstep-e31e64c1-4eda-4e2c-92c8-309ed2c01e7c": {
+ "path": "src/lib/ecosystems/plugins.ts-simstep-e31e64c1-4eda-4e2c-92c8-309ed2c01e7c",
+ "fileName": "plugins.ts",
+ "wiki": "The `snyk-docker-plugin` inspects the container image. It analyzes layers, identifies the OS and its packages (e.g., deb, apk), and scans for application dependencies (e.g., JARs, npm packages). It then constructs dependency graphs for all identified components.",
+ "cellName": "Image Inspection by Plugin - plugins.ts:L12",
+ "cellId": "67b965d1-eb5f-4758-af6b-eb5194ddb55a",
+ "visible": true,
+ "startLine": 12,
+ "endLine": 12,
+ "parentCellId": "00667f37-a3a9-468d-8372-1d2395fe3133",
+ "parentPath": "src/lib/ecosystems/plugins.ts"
+ },
+ "32359976-69b4-481a-acec-c87e0a8adc54": {
+ "path": "32359976-69b4-481a-acec-c87e0a8adc54",
+ "cellName": "Prepare API Request - run-test.ts:L302-310",
+ "cellId": "32359976-69b4-481a-acec-c87e0a8adc54",
+ "visible": true,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61"
+ },
+ "src/lib/snyk-test/run-test.ts-simstep-95d173c1-33b2-404b-b876-d38f5c6b6eb7": {
+ "path": "src/lib/snyk-test/run-test.ts-simstep-95d173c1-33b2-404b-b876-d38f5c6b6eb7",
+ "fileName": "run-test.ts",
+ "wiki": "The `runTest` function iterates through the payloads returned by the plugin and constructs the final request body to be sent to the Snyk API for vulnerability analysis.",
+ "cellName": "Prepare API Request - run-test.ts:L302-310",
+ "cellId": "32359976-69b4-481a-acec-c87e0a8adc54",
+ "visible": true,
+ "startLine": 302,
+ "endLine": 310,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61",
+ "parentPath": "src/lib/snyk-test/run-test.ts"
+ },
+ "7ce21ea9-90c1-4e12-9e5c-beba8eb2f732": {
+ "path": "7ce21ea9-90c1-4e12-9e5c-beba8eb2f732",
+ "cellName": "Process API Response - run-test.ts:L486-495",
+ "cellId": "7ce21ea9-90c1-4e12-9e5c-beba8eb2f732",
+ "visible": true,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61"
+ },
+ "src/lib/snyk-test/run-test.ts-simstep-ec2ecf88-bea3-44f8-a9b2-3d9cbc4614cb": {
+ "path": "src/lib/snyk-test/run-test.ts-simstep-ec2ecf88-bea3-44f8-a9b2-3d9cbc4614cb",
+ "fileName": "run-test.ts",
+ "wiki": "The CLI receives the API response containing vulnerability data. It processes this response, augmenting each vulnerability with Docker-specific context like the Dockerfile instruction or base image where it was introduced.",
+ "cellName": "Process API Response - run-test.ts:L486-495",
+ "cellId": "7ce21ea9-90c1-4e12-9e5c-beba8eb2f732",
+ "visible": true,
+ "startLine": 486,
+ "endLine": 495,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61",
+ "parentPath": "src/lib/snyk-test/run-test.ts"
+ },
+ "9c44a528-5124-4af7-942f-de5a8bcef05b": {
+ "path": "9c44a528-5124-4af7-942f-de5a8bcef05b",
+ "cellName": "Format Vulnerability Results - display-result.ts:L29-132",
+ "cellId": "9c44a528-5124-4af7-942f-de5a8bcef05b",
+ "visible": true,
+ "parentCellId": "068b08fa-d016-455a-97e3-659677e90bd8"
+ },
+ "src/lib/formatters/test/display-result.ts-simstep-3e878605-ffbe-4b24-8218-68814b7d1386": {
+ "path": "src/lib/formatters/test/display-result.ts-simstep-3e878605-ffbe-4b24-8218-68814b7d1386",
+ "fileName": "display-result.ts",
+ "wiki": "The formatting module generates a human-readable output string. This includes a summary of the test, details for each vulnerability, and specific advice for container images, such as base image upgrade recommendations.",
+ "cellName": "Format Vulnerability Results - display-result.ts:L29-132",
+ "cellId": "9c44a528-5124-4af7-942f-de5a8bcef05b",
+ "visible": true,
+ "startLine": 29,
+ "endLine": 132,
+ "parentCellId": "068b08fa-d016-455a-97e3-659677e90bd8",
+ "parentPath": "src/lib/formatters/test/display-result.ts"
+ },
+ "4d0accd1-68e0-4590-826c-0bf21c071a2d": {
+ "path": "4d0accd1-68e0-4590-826c-0bf21c071a2d",
+ "cellName": "Display Results in Console - index.ts:L148-153",
+ "cellId": "4d0accd1-68e0-4590-826c-0bf21c071a2d",
+ "visible": true,
+ "parentCellId": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56"
+ },
+ "src/cli/commands/test/index.ts-simstep-b34213b2-a09b-4926-a190-90e241f96556": {
+ "path": "src/cli/commands/test/index.ts-simstep-b34213b2-a09b-4926-a190-90e241f96556",
+ "fileName": "index.ts",
+ "wiki": "The main `test` command handler prints the final formatted string to the console and then exits with the appropriate status code (1 if vulnerabilities are found, 0 otherwise).",
+ "cellName": "Display Results in Console - index.ts:L148-153",
+ "cellId": "4d0accd1-68e0-4590-826c-0bf21c071a2d",
+ "visible": true,
+ "startLine": 148,
+ "endLine": 153,
+ "parentCellId": "d6e84c3c-2b69-42d8-a59b-af74ff80fa56",
+ "parentPath": "src/cli/commands/test/index.ts"
+ },
+ "e26a7a82-c3e1-4eb7-8584-a8049de3795e": {
+ "path": "e26a7a82-c3e1-4eb7-8584-a8049de3795e",
+ "cellName": "Options Propagation",
+ "cellId": "e26a7a82-c3e1-4eb7-8584-a8049de3795e",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1"
+ },
+ "generated-edge-simstep-9a2da392-1a53-4219-b26d-33618d0555fb-e26a7a82-c3e1-4eb7-8584-a8049de3795e": {
+ "path": "generated-edge-simstep-9a2da392-1a53-4219-b26d-33618d0555fb-e26a7a82-c3e1-4eb7-8584-a8049de3795e",
+ "fileName": "index.ts",
+ "cellName": "Options Propagation",
+ "cellId": "e26a7a82-c3e1-4eb7-8584-a8049de3795e",
+ "visible": true,
+ "startLine": 148,
+ "endLine": 148,
+ "parentPath": "src/cli/commands/test/index.ts"
+ },
+ "39ce2296-aa4d-45d7-90cc-3aa3bb34baa2": {
+ "path": "39ce2296-aa4d-45d7-90cc-3aa3bb34baa2",
+ "cellName": "Plugin Invocation",
+ "cellId": "39ce2296-aa4d-45d7-90cc-3aa3bb34baa2",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "generated-edge-simstep-5f5decb1-8823-4fb6-932a-0e47abab9d20-39ce2296-aa4d-45d7-90cc-3aa3bb34baa2": {
+ "path": "generated-edge-simstep-5f5decb1-8823-4fb6-932a-0e47abab9d20-39ce2296-aa4d-45d7-90cc-3aa3bb34baa2",
+ "fileName": "run-test.ts",
+ "cellName": "Plugin Invocation",
+ "cellId": "39ce2296-aa4d-45d7-90cc-3aa3bb34baa2",
+ "visible": true,
+ "startLine": 22,
+ "endLine": 26,
+ "parentPath": "src/lib/snyk-test/run-test.ts"
+ },
+ "bbf01ef4-925a-4604-99a3-979dc79e0670": {
+ "path": "bbf01ef4-925a-4604-99a3-979dc79e0670",
+ "cellName": "Scan Result\nTransmission",
+ "cellId": "bbf01ef4-925a-4604-99a3-979dc79e0670",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "generated-edge-simstep-b852328f-6f6c-4abf-865b-877cd1eeb3f1-bbf01ef4-925a-4604-99a3-979dc79e0670": {
+ "path": "generated-edge-simstep-b852328f-6f6c-4abf-865b-877cd1eeb3f1-bbf01ef4-925a-4604-99a3-979dc79e0670",
+ "fileName": "plugins.ts",
+ "cellName": "Scan Result Transmission",
+ "cellId": "bbf01ef4-925a-4604-99a3-979dc79e0670",
+ "visible": true,
+ "startLine": 607,
+ "endLine": 607,
+ "parentPath": "src/lib/ecosystems/plugins.ts"
+ },
+ "dd88c6e4-fbf4-446d-a002-ccb3d386253b": {
+ "path": "dd88c6e4-fbf4-446d-a002-ccb3d386253b",
+ "cellName": "Send Scan\nData to\nSnyk API",
+ "cellId": "dd88c6e4-fbf4-446d-a002-ccb3d386253b",
+ "visible": true,
+ "parentCellId": "fbcc93cc-edb3-41be-8008-34cf45f26d61"
+ },
+ "generated-edge-simstep-c6586631-d249-435c-965a-236f0004727c-dd88c6e4-fbf4-446d-a002-ccb3d386253b": {
+ "path": "generated-edge-simstep-c6586631-d249-435c-965a-236f0004727c-dd88c6e4-fbf4-446d-a002-ccb3d386253b",
+ "fileName": "run-test.ts",
+ "cellName": "Send Scan Data to Snyk API",
+ "cellId": "dd88c6e4-fbf4-446d-a002-ccb3d386253b",
+ "visible": true,
+ "startLine": 315,
+ "endLine": 315,
+ "parentPath": "src/lib/snyk-test/run-test.ts"
+ },
+ "95edb03e-789b-42eb-bcd6-8d10292433df": {
+ "path": "95edb03e-789b-42eb-bcd6-8d10292433df",
+ "cellName": "Pass Test\nResults to\nFormatter",
+ "cellId": "95edb03e-789b-42eb-bcd6-8d10292433df",
+ "visible": true,
+ "parentCellId": "41d2a457-f55a-4008-b20c-d732466c69ac"
+ },
+ "generated-edge-simstep-5dd9ab50-00f4-420b-91c5-09ebe74d7a86-95edb03e-789b-42eb-bcd6-8d10292433df": {
+ "path": "generated-edge-simstep-5dd9ab50-00f4-420b-91c5-09ebe74d7a86-95edb03e-789b-42eb-bcd6-8d10292433df",
+ "fileName": "run-test.ts",
+ "cellName": "Pass Test Results to Formatter",
+ "cellId": "95edb03e-789b-42eb-bcd6-8d10292433df",
+ "visible": true,
+ "startLine": 347,
+ "endLine": 347,
+ "parentPath": "src/lib/snyk-test/run-test.ts"
+ },
+ "a317af9a-f54b-49e5-8186-6d435a8ee88f": {
+ "path": "a317af9a-f54b-49e5-8186-6d435a8ee88f",
+ "cellName": "Return Formatted\nString to\nCLI",
+ "cellId": "a317af9a-f54b-49e5-8186-6d435a8ee88f",
+ "visible": true,
+ "parentCellId": "bfd50998-1830-423a-8f91-f0844b925fe1"
+ },
+ "generated-edge-simstep-fd9313e4-f193-4379-8299-8cee4b0c6a42-a317af9a-f54b-49e5-8186-6d435a8ee88f": {
+ "path": "generated-edge-simstep-fd9313e4-f193-4379-8299-8cee4b0c6a42-a317af9a-f54b-49e5-8186-6d435a8ee88f",
+ "fileName": "display-result.ts",
+ "cellName": "Return Formatted String to CLI",
+ "cellId": "a317af9a-f54b-49e5-8186-6d435a8ee88f",
+ "visible": true,
+ "startLine": 382,
+ "endLine": 382,
+ "parentPath": "src/lib/formatters/test/display-result.ts"
+ },
+ "e21febd9-f3e9-404e-b56b-e0b0de87119d": {
+ "path": "e21febd9-f3e9-404e-b56b-e0b0de87119d",
+ "cellName": "test",
+ "cellId": "e21febd9-f3e9-404e-b56b-e0b0de87119d",
+ "visible": true,
+ "parentCellId": "53827863-cec6-4af5-a0c9-b4e71516e392",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test",
+ "fileName": "test",
+ "cellName": "test",
+ "cellId": "e21febd9-f3e9-404e-b56b-e0b0de87119d",
+ "visible": true,
+ "parentCellId": "53827863-cec6-4af5-a0c9-b4e71516e392"
+ },
+ "59f81918-f28a-4a81-a1f3-90674f4ba98b": {
+ "path": "59f81918-f28a-4a81-a1f3-90674f4ba98b",
+ "cellName": "iac",
+ "cellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b",
+ "visible": true,
+ "parentCellId": "e21febd9-f3e9-404e-b56b-e0b0de87119d",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts",
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/scan.ts",
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution",
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac",
+ "fileName": "iac",
+ "cellName": "iac",
+ "cellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b",
+ "visible": true,
+ "parentCellId": "e21febd9-f3e9-404e-b56b-e0b0de87119d"
+ },
+ "2f2829a3-ab4f-403a-b1e9-147673e82388": {
+ "path": "2f2829a3-ab4f-403a-b1e9-147673e82388",
+ "cellName": "index.ts",
+ "cellId": "2f2829a3-ab4f-403a-b1e9-147673e82388",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b"
+ },
+ "59e9a36e-2dea-47b9-8aa3-2e16bff95bce": {
+ "path": "59e9a36e-2dea-47b9-8aa3-2e16bff95bce",
+ "cellName": "scan.ts",
+ "cellId": "59e9a36e-2dea-47b9-8aa3-2e16bff95bce",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b"
+ },
+ "65a9bc10-d113-4370-ab5b-5797e2f19126": {
+ "path": "65a9bc10-d113-4370-ab5b-5797e2f19126",
+ "cellName": "local-execution",
+ "cellId": "65a9bc10-d113-4370-ab5b-5797e2f19126",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts",
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts",
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts",
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution",
+ "fileName": "local-execution",
+ "cellName": "local-execution",
+ "cellId": "65a9bc10-d113-4370-ab5b-5797e2f19126",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b"
+ },
+ "3f85cfa7-b2ff-4be6-a2a0-d573729fafa8": {
+ "path": "3f85cfa7-b2ff-4be6-a2a0-d573729fafa8",
+ "cellName": "output.ts",
+ "cellId": "3f85cfa7-b2ff-4be6-a2a0-d573729fafa8",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b"
+ },
+ "31646bb2-a8da-4354-abfa-a105b8b4aaca": {
+ "path": "31646bb2-a8da-4354-abfa-a105b8b4aaca",
+ "cellName": "index.ts",
+ "cellId": "31646bb2-a8da-4354-abfa-a105b8b4aaca",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126"
+ },
+ "ceb4375e-c06d-4597-aebe-23cfcaa9c49c": {
+ "path": "ceb4375e-c06d-4597-aebe-23cfcaa9c49c",
+ "cellName": "file-parser.ts",
+ "cellId": "ceb4375e-c06d-4597-aebe-23cfcaa9c49c",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126"
+ },
+ "41734f98-e809-4868-b95a-b0729812ab46": {
+ "path": "41734f98-e809-4868-b95a-b0729812ab46",
+ "cellName": "file-scanner.ts",
+ "cellId": "41734f98-e809-4868-b95a-b0729812ab46",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126"
+ },
+ "cc1b7e58-07b9-482b-b6cc-2172da07350e": {
+ "path": "cc1b7e58-07b9-482b-b6cc-2172da07350e",
+ "cellName": "process-results",
+ "cellId": "cc1b7e58-07b9-482b-b6cc-2172da07350e",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results",
+ "fileName": "process-results",
+ "cellName": "process-results",
+ "cellId": "cc1b7e58-07b9-482b-b6cc-2172da07350e",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126"
+ },
+ "b2d182fe-c593-4fa9-94df-2fd932bafcce": {
+ "path": "b2d182fe-c593-4fa9-94df-2fd932bafcce",
+ "cellName": "results-formatter.ts",
+ "cellId": "b2d182fe-c593-4fa9-94df-2fd932bafcce",
+ "visible": true,
+ "parentCellId": "cc1b7e58-07b9-482b-b6cc-2172da07350e"
+ },
+ "d40516fd-463a-4d22-ac46-9ccc199f9a64": {
+ "path": "d40516fd-463a-4d22-ac46-9ccc199f9a64",
+ "cellName": "Command Invocation: `snyk iac test` - index.ts:L23-57",
+ "cellId": "d40516fd-463a-4d22-ac46-9ccc199f9a64",
+ "visible": true,
+ "parentCellId": "2f2829a3-ab4f-403a-b1e9-147673e82388"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts-simstep-0d610bd9-4b7a-4394-a94d-7e9ab0220bb5": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts-simstep-0d610bd9-4b7a-4394-a94d-7e9ab0220bb5",
+ "fileName": "index.ts",
+ "wiki": "The user executes the `snyk iac test` command with a path to a directory containing Infrastructure as Code files. The CLI framework parses the command and its arguments, and delegates execution to the main `iac test` function.",
+ "cellName": "Command Invocation: `snyk iac test` - index.ts:L23-57",
+ "cellId": "d40516fd-463a-4d22-ac46-9ccc199f9a64",
+ "visible": true,
+ "startLine": 23,
+ "endLine": 57,
+ "parentCellId": "2f2829a3-ab4f-403a-b1e9-147673e82388",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts"
+ },
+ "2a2136a1-26d6-4b85-8eed-6f0362aef3a1": {
+ "path": "2a2136a1-26d6-4b85-8eed-6f0362aef3a1",
+ "cellName": "Discover IaC Files in Directory - index.ts:L57-65",
+ "cellId": "2a2136a1-26d6-4b85-8eed-6f0362aef3a1",
+ "visible": true,
+ "parentCellId": "31646bb2-a8da-4354-abfa-a105b8b4aaca"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts-simstep-7bb3e65e-b598-465d-babc-5a3357482b7b": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts-simstep-7bb3e65e-b598-465d-babc-5a3357482b7b",
+ "fileName": "index.ts",
+ "wiki": "The system recursively scans the provided directory path to find all files. It then filters this list to include only files with supported IaC extensions like `.tf`, `.yaml`, `.yml`, and `.json`.",
+ "cellName": "Discover IaC Files in Directory - index.ts:L57-65",
+ "cellId": "2a2136a1-26d6-4b85-8eed-6f0362aef3a1",
+ "visible": true,
+ "startLine": 57,
+ "endLine": 65,
+ "parentCellId": "31646bb2-a8da-4354-abfa-a105b8b4aaca",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts"
+ },
+ "09d6740f-3538-4c0a-a1c5-42118a8af84c": {
+ "path": "09d6740f-3538-4c0a-a1c5-42118a8af84c",
+ "cellName": "Parse IaC File Content - file-parser.ts:L63-134",
+ "cellId": "09d6740f-3538-4c0a-a1c5-42118a8af84c",
+ "visible": true,
+ "parentCellId": "ceb4375e-c06d-4597-aebe-23cfcaa9c49c"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts-simstep-53a50076-1327-4f49-8529-b8e1d95c4fb5": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts-simstep-53a50076-1327-4f49-8529-b8e1d95c4fb5",
+ "fileName": "file-parser.ts",
+ "wiki": "The file parser determines the file type (Terraform, Kubernetes, etc.) and uses the appropriate parsing logic. For Terraform files, it converts the HCL syntax into a structured JSON object. It also handles special cases like Terraform Plan files.",
+ "cellName": "Parse IaC File Content - file-parser.ts:L63-134",
+ "cellId": "09d6740f-3538-4c0a-a1c5-42118a8af84c",
+ "visible": true,
+ "startLine": 63,
+ "endLine": 134,
+ "parentCellId": "ceb4375e-c06d-4597-aebe-23cfcaa9c49c",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts"
+ },
+ "f488ec87-4b4f-4f04-a319-2ae372ff6c7d": {
+ "path": "f488ec87-4b4f-4f04-a319-2ae372ff6c7d",
+ "cellName": "Scan Files with Policy Engine - file-scanner.ts:L16-45",
+ "cellId": "f488ec87-4b4f-4f04-a319-2ae372ff6c7d",
+ "visible": true,
+ "parentCellId": "41734f98-e809-4868-b95a-b0729812ab46"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts-simstep-9f1609b0-7cca-43d9-ac49-d96eefddadbd": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts-simstep-9f1609b0-7cca-43d9-ac49-d96eefddadbd",
+ "fileName": "file-scanner.ts",
+ "wiki": "The scanner loads the appropriate policy engine (a WASM bundle and data file) for the file's engine type (e.g., Terraform). It then executes the engine, providing the parsed JSON content as input. The engine evaluates the configuration against a set of security rules.",
+ "cellName": "Scan Files with Policy Engine - file-scanner.ts:L16-45",
+ "cellId": "f488ec87-4b4f-4f04-a319-2ae372ff6c7d",
+ "visible": true,
+ "startLine": 16,
+ "endLine": 45,
+ "parentCellId": "41734f98-e809-4868-b95a-b0729812ab46",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts"
+ },
+ "2b39850a-eb17-451c-a8c7-c7d8a244a765": {
+ "path": "2b39850a-eb17-451c-a8c7-c7d8a244a765",
+ "cellName": "Format Scan Results - results-formatter.ts:L11-53",
+ "cellId": "2b39850a-eb17-451c-a8c7-c7d8a244a765",
+ "visible": true,
+ "parentCellId": "b2d182fe-c593-4fa9-94df-2fd932bafcce"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts-simstep-c8fb9227-5b43-4a25-8daf-7e99770617ec": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts-simstep-c8fb9227-5b43-4a25-8daf-7e99770617ec",
+ "fileName": "results-formatter.ts",
+ "wiki": "The results processor enriches the raw scan results with detailed information for each issue, such as impact, resolution steps, and documentation links. It also applies any ignores from `.snyk` policy files and filters results based on the severity threshold.",
+ "cellName": "Format Scan Results - results-formatter.ts:L11-53",
+ "cellId": "2b39850a-eb17-451c-a8c7-c7d8a244a765",
+ "visible": true,
+ "startLine": 11,
+ "endLine": 53,
+ "parentCellId": "b2d182fe-c593-4fa9-94df-2fd932bafcce",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts"
+ },
+ "02dede36-57b9-46a8-9b12-d832a4263d36": {
+ "path": "02dede36-57b9-46a8-9b12-d832a4263d36",
+ "cellName": "Display Formatted Output - output.ts:L45-100",
+ "cellId": "02dede36-57b9-46a8-9b12-d832a4263d36",
+ "visible": true,
+ "parentCellId": "3f85cfa7-b2ff-4be6-a2a0-d573729fafa8"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts-simstep-8017e430-d4ab-4001-99b7-073177b5e2a9": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts-simstep-8017e430-d4ab-4001-99b7-073177b5e2a9",
+ "fileName": "output.ts",
+ "wiki": "The output handler takes the formatted results and generates the final output string based on the user's requested format (`--json`, `--sarif`, or default human-readable text). This string is then printed to the console.",
+ "cellName": "Display Formatted Output - output.ts:L45-100",
+ "cellId": "02dede36-57b9-46a8-9b12-d832a4263d36",
+ "visible": true,
+ "startLine": 45,
+ "endLine": 100,
+ "parentCellId": "3f85cfa7-b2ff-4be6-a2a0-d573729fafa8",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts"
+ },
+ "7a8f0002-4159-498f-8d19-6a8e8b13460f": {
+ "path": "7a8f0002-4159-498f-8d19-6a8e8b13460f",
+ "cellName": "Pass Paths\nto Scan\nLogic",
+ "cellId": "7a8f0002-4159-498f-8d19-6a8e8b13460f",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b"
+ },
+ "generated-edge-simstep-f6e1ec2b-b6e2-47f1-8824-62fbef34d6ec-7a8f0002-4159-498f-8d19-6a8e8b13460f": {
+ "path": "generated-edge-simstep-f6e1ec2b-b6e2-47f1-8824-62fbef34d6ec-7a8f0002-4159-498f-8d19-6a8e8b13460f",
+ "fileName": "index.ts",
+ "cellName": "Pass Paths to Scan Logic",
+ "cellId": "7a8f0002-4159-498f-8d19-6a8e8b13460f",
+ "visible": true,
+ "startLine": 44,
+ "endLine": 44,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts"
+ },
+ "cfca8a58-793d-4900-a07b-ce67c880adcc": {
+ "path": "cfca8a58-793d-4900-a07b-ce67c880adcc",
+ "cellName": "Send File\nPaths for\nParsing",
+ "cellId": "cfca8a58-793d-4900-a07b-ce67c880adcc",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126"
+ },
+ "generated-edge-simstep-3f061a24-dabb-4bdd-a6f3-4e1e5160c370-cfca8a58-793d-4900-a07b-ce67c880adcc": {
+ "path": "generated-edge-simstep-3f061a24-dabb-4bdd-a6f3-4e1e5160c370-cfca8a58-793d-4900-a07b-ce67c880adcc",
+ "fileName": "index.ts",
+ "cellName": "Send File Paths for Parsing",
+ "cellId": "cfca8a58-793d-4900-a07b-ce67c880adcc",
+ "visible": true,
+ "startLine": 68,
+ "endLine": 68,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts"
+ },
+ "bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763": {
+ "path": "bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763",
+ "cellName": "Send Parsed\nFiles to\nScanner",
+ "cellId": "bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126"
+ },
+ "generated-edge-simstep-86554b35-33a3-4fc4-bdf5-d218b842e89a-bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763": {
+ "path": "generated-edge-simstep-86554b35-33a3-4fc4-bdf5-d218b842e89a-bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763",
+ "fileName": "file-parser.ts",
+ "cellName": "Send Parsed Files to Scanner",
+ "cellId": "bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763",
+ "visible": true,
+ "startLine": 75,
+ "endLine": 75,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts"
+ },
+ "7f4f9897-ca3b-4aa9-9c72-6ed854b8319e": {
+ "path": "7f4f9897-ca3b-4aa9-9c72-6ed854b8319e",
+ "cellName": "Send Raw\nResults for\nFormatting",
+ "cellId": "7f4f9897-ca3b-4aa9-9c72-6ed854b8319e",
+ "visible": true,
+ "parentCellId": "65a9bc10-d113-4370-ab5b-5797e2f19126"
+ },
+ "generated-edge-simstep-585c196a-cd46-4c51-ae04-dc8efd241ad1-7f4f9897-ca3b-4aa9-9c72-6ed854b8319e": {
+ "path": "generated-edge-simstep-585c196a-cd46-4c51-ae04-dc8efd241ad1-7f4f9897-ca3b-4aa9-9c72-6ed854b8319e",
+ "fileName": "file-scanner.ts",
+ "cellName": "Send Raw Results for Formatting",
+ "cellId": "7f4f9897-ca3b-4aa9-9c72-6ed854b8319e",
+ "visible": true,
+ "startLine": 119,
+ "endLine": 119,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts"
+ },
+ "bf67abac-660c-4a96-901e-43ab54491b86": {
+ "path": "bf67abac-660c-4a96-901e-43ab54491b86",
+ "cellName": "Pass Formatted\nResults to\nOutput Handler",
+ "cellId": "bf67abac-660c-4a96-901e-43ab54491b86",
+ "visible": true,
+ "parentCellId": "59f81918-f28a-4a81-a1f3-90674f4ba98b"
+ },
+ "generated-edge-simstep-28bc0fc7-3a19-403a-b515-8053d058c231-bf67abac-660c-4a96-901e-43ab54491b86": {
+ "path": "generated-edge-simstep-28bc0fc7-3a19-403a-b515-8053d058c231-bf67abac-660c-4a96-901e-43ab54491b86",
+ "fileName": "results-formatter.ts",
+ "cellName": "Pass Formatted Results to Output Handler",
+ "cellId": "bf67abac-660c-4a96-901e-43ab54491b86",
+ "visible": true,
+ "startLine": 62,
+ "endLine": 62,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts"
+ },
+ "53793438-dce6-483a-8993-97e7662a8d42": {
+ "path": "53793438-dce6-483a-8993-97e7662a8d42",
+ "cellName": "auth",
+ "cellId": "53793438-dce6-483a-8993-97e7662a8d42",
+ "visible": true,
+ "parentCellId": "53827863-cec6-4af5-a0c9-b4e71516e392",
+ "children": [
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth",
+ "fileName": "auth",
+ "cellName": "auth",
+ "cellId": "53793438-dce6-483a-8993-97e7662a8d42",
+ "visible": true,
+ "parentCellId": "53827863-cec6-4af5-a0c9-b4e71516e392"
+ },
+ "4ec38c9a-8fb5-412f-a04f-7205eadb5db3": {
+ "path": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "cellName": "index.ts",
+ "cellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "visible": true,
+ "parentCellId": "53793438-dce6-483a-8993-97e7662a8d42"
+ },
+ "d8d32c3e-3063-49d2-9748-955fe2e54502": {
+ "path": "d8d32c3e-3063-49d2-9748-955fe2e54502",
+ "cellName": "verify.ts",
+ "cellId": "d8d32c3e-3063-49d2-9748-955fe2e54502",
+ "visible": true,
+ "parentCellId": "53793438-dce6-483a-8993-97e7662a8d42"
+ },
+ "019d9dd3-a90b-46d4-b6f9-e38d658a5540": {
+ "path": "019d9dd3-a90b-46d4-b6f9-e38d658a5540",
+ "cellName": "Flow 1 (Token): Auth Command Handler - index.ts:L125",
+ "cellId": "019d9dd3-a90b-46d4-b6f9-e38d658a5540",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-d272eaa7-ead0-48f4-8297-17ee2edb70ee": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-d272eaa7-ead0-48f4-8297-17ee2edb70ee",
+ "fileName": "index.ts",
+ "wiki": "The user runs `snyk auth `. The main function in `src/cli/commands/auth/index.ts` receives the token as an argument and determines that a token was provided, opting to verify it directly.",
+ "cellName": "Flow 1 (Token): Auth Command Handler - index.ts:L125",
+ "cellId": "019d9dd3-a90b-46d4-b6f9-e38d658a5540",
+ "visible": true,
+ "startLine": 125,
+ "endLine": 125,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "b6ddda51-6d63-43cc-ba18-9228f6a0db94": {
+ "path": "b6ddda51-6d63-43cc-ba18-9228f6a0db94",
+ "cellName": "Flow 1 (Token): Prepare Verification Request - verify.ts:L4-11",
+ "cellId": "b6ddda51-6d63-43cc-ba18-9228f6a0db94",
+ "visible": true,
+ "parentCellId": "d8d32c3e-3063-49d2-9748-955fe2e54502"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts-simstep-bd504c66-5262-4759-9652-788c78022410": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts-simstep-bd504c66-5262-4759-9652-788c78022410",
+ "fileName": "verify.ts",
+ "wiki": "The `verifyAPI` function in `src/cli/commands/auth/verify.ts` receives the token and constructs a payload for an HTTP POST request to the `/verify/token` API endpoint.",
+ "cellName": "Flow 1 (Token): Prepare Verification Request - verify.ts:L4-11",
+ "cellId": "b6ddda51-6d63-43cc-ba18-9228f6a0db94",
+ "visible": true,
+ "startLine": 4,
+ "endLine": 11,
+ "parentCellId": "d8d32c3e-3063-49d2-9748-955fe2e54502",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts"
+ },
+ "46b53f46-d7b9-4dc5-b511-37b341d206b3": {
+ "path": "46b53f46-d7b9-4dc5-b511-37b341d206b3",
+ "cellName": "Flow 1 (Token): Handle API Response - index.ts:L129-141",
+ "cellId": "46b53f46-d7b9-4dc5-b511-37b341d206b3",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-bb8323cf-b3be-4b7a-bfdf-b00724fd94d2": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-bb8323cf-b3be-4b7a-bfdf-b00724fd94d2",
+ "fileName": "index.ts",
+ "wiki": "The promise from `verifyAPI` resolves, and the `.then()` handler in the main `auth` command function is executed. It checks the HTTP status code for success (200 or 201).",
+ "cellName": "Flow 1 (Token): Handle API Response - index.ts:L129-141",
+ "cellId": "46b53f46-d7b9-4dc5-b511-37b341d206b3",
+ "visible": true,
+ "startLine": 129,
+ "endLine": 141,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "a7936592-81ee-4bc4-a1fe-efbd087a2662": {
+ "path": "a7936592-81ee-4bc4-a1fe-efbd087a2662",
+ "cellName": "Flow 1 (Token): Save Token to Local Config - index.ts:L135-140",
+ "cellId": "a7936592-81ee-4bc4-a1fe-efbd087a2662",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-1f53ea1d-132d-4d0a-81c8-5e43ce78c9f7": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-1f53ea1d-132d-4d0a-81c8-5e43ce78c9f7",
+ "fileName": "index.ts",
+ "wiki": "The `snyk.config.set('api', ...)` function writes the API token to the local user configuration file, persisting the authentication. A success message is then prepared to be displayed to the user.",
+ "cellName": "Flow 1 (Token): Save Token to Local Config - index.ts:L135-140",
+ "cellId": "a7936592-81ee-4bc4-a1fe-efbd087a2662",
+ "visible": true,
+ "startLine": 135,
+ "endLine": 140,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "389e9a12-2128-49cd-be28-08b2af738265": {
+ "path": "389e9a12-2128-49cd-be28-08b2af738265",
+ "cellName": "Flow 2 (Web): Auth Command Handler - index.ts:L127",
+ "cellId": "389e9a12-2128-49cd-be28-08b2af738265",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-21a1edc6-531a-412d-824f-2fcf89a7c636": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-21a1edc6-531a-412d-824f-2fcf89a7c636",
+ "fileName": "index.ts",
+ "wiki": "The user runs `snyk auth` without a token. The main function in `src/cli/commands/auth/index.ts` determines that no token was provided and decides to initiate web-based authentication.",
+ "cellName": "Flow 2 (Web): Auth Command Handler - index.ts:L127",
+ "cellId": "389e9a12-2128-49cd-be28-08b2af738265",
+ "visible": true,
+ "startLine": 127,
+ "endLine": 127,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "d70cd77f-39da-4a46-968f-86fa5655a0cc": {
+ "path": "d70cd77f-39da-4a46-968f-86fa5655a0cc",
+ "cellName": "Flow 2 (Web): Initiate Web Authentication - index.ts:L31",
+ "cellId": "d70cd77f-39da-4a46-968f-86fa5655a0cc",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-8f197ea3-6a58-4ebe-b7da-ace35c8c0437": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-8f197ea3-6a58-4ebe-b7da-ace35c8c0437",
+ "fileName": "index.ts",
+ "wiki": "The `webAuth` function starts a local web server to listen for a callback from the Snyk platform and constructs the authentication URL, which includes a unique token for this session.",
+ "cellName": "Flow 2 (Web): Initiate Web Authentication - index.ts:L31",
+ "cellId": "d70cd77f-39da-4a46-968f-86fa5655a0cc",
+ "visible": true,
+ "startLine": 31,
+ "endLine": 31,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "5f0301ca-f6e9-40e9-9e0c-3d239a0b3824": {
+ "path": "5f0301ca-f6e9-40e9-9e0c-3d239a0b3824",
+ "cellName": "Flow 2 (Web): Receive Token via Callback - index.ts:L31",
+ "cellId": "5f0301ca-f6e9-40e9-9e0c-3d239a0b3824",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-e29be9f6-e5fc-469c-b36c-36e24fef78a4": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-e29be9f6-e5fc-469c-b36c-36e24fef78a4",
+ "fileName": "index.ts",
+ "wiki": "After the user authenticates on the Snyk website, the browser is redirected to the local server's callback URL (e.g., `http://localhost:12345/callback?token=...`). The local server handler within the `webAuth` function extracts the new API token from the URL query parameters.",
+ "cellName": "Flow 2 (Web): Receive Token via Callback - index.ts:L31",
+ "cellId": "5f0301ca-f6e9-40e9-9e0c-3d239a0b3824",
+ "visible": true,
+ "startLine": 31,
+ "endLine": 31,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "b9f46af5-eb4d-4b0e-9132-1b4a0cdb5b88": {
+ "path": "b9f46af5-eb4d-4b0e-9132-1b4a0cdb5b88",
+ "cellName": "Flow 2 (Web): Handle Verification Response - index.ts:L129-141",
+ "cellId": "b9f46af5-eb4d-4b0e-9132-1b4a0cdb5b88",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-100156ef-69a7-4d75-a012-8e52701516bc": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-100156ef-69a7-4d75-a012-8e52701516bc",
+ "fileName": "index.ts",
+ "wiki": "The promise from `webAuth` (which internally called `verifyAPI`) resolves. The `.then()` handler in the main `auth` function executes, checking the `statusCode` for success.",
+ "cellName": "Flow 2 (Web): Handle Verification Response - index.ts:L129-141",
+ "cellId": "b9f46af5-eb4d-4b0e-9132-1b4a0cdb5b88",
+ "visible": true,
+ "startLine": 129,
+ "endLine": 141,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "a11fe883-8ace-42b7-b5d4-49abcb0cd9d6": {
+ "path": "a11fe883-8ace-42b7-b5d4-49abcb0cd9d6",
+ "cellName": "Flow 2 (Web): Save Token to Local Config - index.ts:L135-140",
+ "cellId": "a11fe883-8ace-42b7-b5d4-49abcb0cd9d6",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-a6b0976a-109e-48a8-8f27-ec9c921b6a3f": {
+ "path": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-a6b0976a-109e-48a8-8f27-ec9c921b6a3f",
+ "fileName": "index.ts",
+ "wiki": "The `snyk.config.set('api', ...)` function writes the API token to the local user configuration file, persisting the authentication. A success message is then prepared for the user.",
+ "cellName": "Flow 2 (Web): Save Token to Local Config - index.ts:L135-140",
+ "cellId": "a11fe883-8ace-42b7-b5d4-49abcb0cd9d6",
+ "visible": true,
+ "startLine": 135,
+ "endLine": 140,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "a634b412-e8ad-4445-afb7-6aa147745211": {
+ "path": "a634b412-e8ad-4445-afb7-6aa147745211",
+ "cellName": "Flow 1\n(Token): Pass\nToken to\n`verifyAPI`",
+ "cellId": "a634b412-e8ad-4445-afb7-6aa147745211",
+ "visible": true,
+ "parentCellId": "53793438-dce6-483a-8993-97e7662a8d42"
+ },
+ "generated-edge-simstep-0bb640b2-6aea-444b-8f66-16ecf5159687-a634b412-e8ad-4445-afb7-6aa147745211": {
+ "path": "generated-edge-simstep-0bb640b2-6aea-444b-8f66-16ecf5159687-a634b412-e8ad-4445-afb7-6aa147745211",
+ "fileName": "index.ts",
+ "cellName": "Flow 1 (Token): Pass Token to `verifyAPI`",
+ "cellId": "a634b412-e8ad-4445-afb7-6aa147745211",
+ "visible": true,
+ "startLine": 125,
+ "endLine": 125,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "a449bc86-9fbd-4910-b917-3905685a2598": {
+ "path": "a449bc86-9fbd-4910-b917-3905685a2598",
+ "cellName": "Flow 1\n(Token): API\nCall to\nSnyk",
+ "cellId": "a449bc86-9fbd-4910-b917-3905685a2598",
+ "visible": true,
+ "parentCellId": "53793438-dce6-483a-8993-97e7662a8d42"
+ },
+ "generated-edge-simstep-a3409c09-dca1-40e4-a81a-948021bab75e-a449bc86-9fbd-4910-b917-3905685a2598": {
+ "path": "generated-edge-simstep-a3409c09-dca1-40e4-a81a-948021bab75e-a449bc86-9fbd-4910-b917-3905685a2598",
+ "fileName": "verify.ts",
+ "cellName": "Flow 1 (Token): API Call to Snyk",
+ "cellId": "a449bc86-9fbd-4910-b917-3905685a2598",
+ "visible": true,
+ "startLine": 13,
+ "endLine": 24,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts"
+ },
+ "69fd0286-e062-407c-bd1e-09253cc8869a": {
+ "path": "69fd0286-e062-407c-bd1e-09253cc8869a",
+ "cellName": "Flow 1\n(Token): Pass\nToken for\nConfiguration",
+ "cellId": "69fd0286-e062-407c-bd1e-09253cc8869a",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "generated-edge-simstep-6a031992-4b15-4124-b0d6-8c58fcdacebd-69fd0286-e062-407c-bd1e-09253cc8869a": {
+ "path": "generated-edge-simstep-6a031992-4b15-4124-b0d6-8c58fcdacebd-69fd0286-e062-407c-bd1e-09253cc8869a",
+ "fileName": "index.ts",
+ "cellName": "Flow 1 (Token): Pass Token for Configuration",
+ "cellId": "69fd0286-e062-407c-bd1e-09253cc8869a",
+ "visible": true,
+ "startLine": 135,
+ "endLine": 135,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4": {
+ "path": "5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4",
+ "cellName": "Flow 2\n(Web): Call\n`webAuth`",
+ "cellId": "5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "generated-edge-simstep-dfe86ab2-036e-4112-942d-4c072d2495a2-5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4": {
+ "path": "generated-edge-simstep-dfe86ab2-036e-4112-942d-4c072d2495a2-5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4",
+ "fileName": "index.ts",
+ "cellName": "Flow 2 (Web): Call `webAuth`",
+ "cellId": "5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4",
+ "visible": true,
+ "startLine": 127,
+ "endLine": 127,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "03356d15-72f0-48b5-8812-277ae0c6c99d": {
+ "path": "03356d15-72f0-48b5-8812-277ae0c6c99d",
+ "cellName": "Flow 2\n(Web): Open\nBrowser for\nLogin",
+ "cellId": "03356d15-72f0-48b5-8812-277ae0c6c99d",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "generated-edge-simstep-245b3521-8f79-4bf4-95fd-a1cd3112267d-03356d15-72f0-48b5-8812-277ae0c6c99d": {
+ "path": "generated-edge-simstep-245b3521-8f79-4bf4-95fd-a1cd3112267d-03356d15-72f0-48b5-8812-277ae0c6c99d",
+ "fileName": "index.ts",
+ "cellName": "Flow 2 (Web): Open Browser for Login",
+ "cellId": "03356d15-72f0-48b5-8812-277ae0c6c99d",
+ "visible": true,
+ "startLine": 31,
+ "endLine": 31,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7": {
+ "path": "8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7",
+ "cellName": "Flow 2\n(Web): Pass\nToken for\nVerification",
+ "cellId": "8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "generated-edge-simstep-1df9cdfb-8e4a-458f-b278-3a109debb99d-8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7": {
+ "path": "generated-edge-simstep-1df9cdfb-8e4a-458f-b278-3a109debb99d-8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7",
+ "fileName": "index.ts",
+ "cellName": "Flow 2 (Web): Pass Token for Verification",
+ "cellId": "8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7",
+ "visible": true,
+ "startLine": 4,
+ "endLine": 4,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "241d3ca1-2314-4e53-882a-f16aab0e2c75": {
+ "path": "241d3ca1-2314-4e53-882a-f16aab0e2c75",
+ "cellName": "Flow 2\n(Web): Pass\nToken for\nConfiguration",
+ "cellId": "241d3ca1-2314-4e53-882a-f16aab0e2c75",
+ "visible": true,
+ "parentCellId": "4ec38c9a-8fb5-412f-a04f-7205eadb5db3"
+ },
+ "generated-edge-simstep-b3b8840e-ffe0-492d-9b0e-d86171b0fa97-241d3ca1-2314-4e53-882a-f16aab0e2c75": {
+ "path": "generated-edge-simstep-b3b8840e-ffe0-492d-9b0e-d86171b0fa97-241d3ca1-2314-4e53-882a-f16aab0e2c75",
+ "fileName": "index.ts",
+ "cellName": "Flow 2 (Web): Pass Token for Configuration",
+ "cellId": "241d3ca1-2314-4e53-882a-f16aab0e2c75",
+ "visible": true,
+ "startLine": 135,
+ "endLine": 135,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts"
+ },
+ "a42c49ae-07ec-4413-9235-06e2b9c404a0": {
+ "path": "a42c49ae-07ec-4413-9235-06e2b9c404a0",
+ "cellName": "help",
+ "cellId": "a42c49ae-07ec-4413-9235-06e2b9c404a0",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1",
+ "children": [
+ "snyk-cli-b8d7f01/help/cli-commands"
+ ]
+ },
+ "snyk-cli-b8d7f01/help": {
+ "path": "snyk-cli-b8d7f01/help",
+ "fileName": "help",
+ "cellName": "help",
+ "cellId": "a42c49ae-07ec-4413-9235-06e2b9c404a0",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1"
+ },
+ "e94dd5ce-8526-4f27-861e-e75f70441446": {
+ "path": "e94dd5ce-8526-4f27-861e-e75f70441446",
+ "cellName": "test",
+ "cellId": "e94dd5ce-8526-4f27-861e-e75f70441446",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1",
+ "children": [
+ "snyk-cli-b8d7f01/test/jest",
+ "snyk-cli-b8d7f01/test/acceptance"
+ ]
+ },
+ "snyk-cli-b8d7f01/test": {
+ "path": "snyk-cli-b8d7f01/test",
+ "fileName": "test",
+ "cellName": "test",
+ "cellId": "e94dd5ce-8526-4f27-861e-e75f70441446",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1"
+ },
+ "0ec29183-bdee-470d-a429-c31d5f14dc31": {
+ "path": "0ec29183-bdee-470d-a429-c31d5f14dc31",
+ "cellName": "cli-commands",
+ "cellId": "0ec29183-bdee-470d-a429-c31d5f14dc31",
+ "visible": true,
+ "parentCellId": "a42c49ae-07ec-4413-9235-06e2b9c404a0",
+ "children": [
+ "snyk-cli-b8d7f01/help/cli-commands/sbom.md"
+ ]
+ },
+ "snyk-cli-b8d7f01/help/cli-commands": {
+ "path": "snyk-cli-b8d7f01/help/cli-commands",
+ "fileName": "cli-commands",
+ "cellName": "cli-commands",
+ "cellId": "0ec29183-bdee-470d-a429-c31d5f14dc31",
+ "visible": true,
+ "parentCellId": "a42c49ae-07ec-4413-9235-06e2b9c404a0"
+ },
+ "d58d5525-eb2f-4e38-98b7-870794be270e": {
+ "path": "d58d5525-eb2f-4e38-98b7-870794be270e",
+ "cellName": "jest",
+ "cellId": "d58d5525-eb2f-4e38-98b7-870794be270e",
+ "visible": true,
+ "parentCellId": "e94dd5ce-8526-4f27-861e-e75f70441446",
+ "children": [
+ "snyk-cli-b8d7f01/test/jest/acceptance"
+ ]
+ },
+ "snyk-cli-b8d7f01/test/jest": {
+ "path": "snyk-cli-b8d7f01/test/jest",
+ "fileName": "jest",
+ "cellName": "jest",
+ "cellId": "d58d5525-eb2f-4e38-98b7-870794be270e",
+ "visible": true,
+ "parentCellId": "e94dd5ce-8526-4f27-861e-e75f70441446"
+ },
+ "4c7cf884-6ec5-4018-a74d-7aeb078fb2ef": {
+ "path": "4c7cf884-6ec5-4018-a74d-7aeb078fb2ef",
+ "cellName": "acceptance",
+ "cellId": "4c7cf884-6ec5-4018-a74d-7aeb078fb2ef",
+ "visible": true,
+ "parentCellId": "e94dd5ce-8526-4f27-861e-e75f70441446",
+ "children": [
+ "snyk-cli-b8d7f01/test/acceptance/fake-server.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/test/acceptance": {
+ "path": "snyk-cli-b8d7f01/test/acceptance",
+ "fileName": "acceptance",
+ "cellName": "acceptance",
+ "cellId": "4c7cf884-6ec5-4018-a74d-7aeb078fb2ef",
+ "visible": true,
+ "parentCellId": "e94dd5ce-8526-4f27-861e-e75f70441446"
+ },
+ "2a94082d-8e68-4e8c-b792-def89c69a845": {
+ "path": "2a94082d-8e68-4e8c-b792-def89c69a845",
+ "cellName": "sbom.md",
+ "cellId": "2a94082d-8e68-4e8c-b792-def89c69a845",
+ "visible": true,
+ "parentCellId": "0ec29183-bdee-470d-a429-c31d5f14dc31"
+ },
+ "547b6a18-fa3e-495f-af04-2e9c824eff92": {
+ "path": "547b6a18-fa3e-495f-af04-2e9c824eff92",
+ "cellName": "acceptance",
+ "cellId": "547b6a18-fa3e-495f-af04-2e9c824eff92",
+ "visible": true,
+ "parentCellId": "d58d5525-eb2f-4e38-98b7-870794be270e",
+ "children": [
+ "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom"
+ ]
+ },
+ "snyk-cli-b8d7f01/test/jest/acceptance": {
+ "path": "snyk-cli-b8d7f01/test/jest/acceptance",
+ "fileName": "acceptance",
+ "cellName": "acceptance",
+ "cellId": "547b6a18-fa3e-495f-af04-2e9c824eff92",
+ "visible": true,
+ "parentCellId": "d58d5525-eb2f-4e38-98b7-870794be270e"
+ },
+ "abbe9a10-c7b1-40f9-acf0-236755130bef": {
+ "path": "abbe9a10-c7b1-40f9-acf0-236755130bef",
+ "cellName": "fake-server.ts",
+ "cellId": "abbe9a10-c7b1-40f9-acf0-236755130bef",
+ "visible": true,
+ "parentCellId": "4c7cf884-6ec5-4018-a74d-7aeb078fb2ef"
+ },
+ "078d87e8-7b02-428a-b089-8a7bd823f021": {
+ "path": "078d87e8-7b02-428a-b089-8a7bd823f021",
+ "cellName": "snyk-sbom",
+ "cellId": "078d87e8-7b02-428a-b089-8a7bd823f021",
+ "visible": true,
+ "parentCellId": "547b6a18-fa3e-495f-af04-2e9c824eff92",
+ "children": [
+ "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom": {
+ "path": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom",
+ "fileName": "snyk-sbom",
+ "cellName": "snyk-sbom",
+ "cellId": "078d87e8-7b02-428a-b089-8a7bd823f021",
+ "visible": true,
+ "parentCellId": "547b6a18-fa3e-495f-af04-2e9c824eff92"
+ },
+ "6fde9c8f-c276-42ae-8343-b7160512d3f4": {
+ "path": "6fde9c8f-c276-42ae-8343-b7160512d3f4",
+ "cellName": "sbom.spec.ts",
+ "cellId": "6fde9c8f-c276-42ae-8343-b7160512d3f4",
+ "visible": true,
+ "parentCellId": "078d87e8-7b02-428a-b089-8a7bd823f021"
+ },
+ "f5274edb-f76d-406c-b9f5-b48eaff595ef": {
+ "path": "f5274edb-f76d-406c-b9f5-b48eaff595ef",
+ "cellName": "User Executes `snyk sbom` Command - sbom.md:L284-285",
+ "cellId": "f5274edb-f76d-406c-b9f5-b48eaff595ef",
+ "visible": true,
+ "parentCellId": "2a94082d-8e68-4e8c-b792-def89c69a845"
+ },
+ "snyk-cli-b8d7f01/help/cli-commands/sbom.md-simstep-e5f0127f-0d5e-4cff-93d7-559a74ce558e": {
+ "path": "snyk-cli-b8d7f01/help/cli-commands/sbom.md-simstep-e5f0127f-0d5e-4cff-93d7-559a74ce558e",
+ "fileName": "sbom.md",
+ "wiki": "A user initiates the SBOM generation process by running the `snyk sbom` command from their terminal, specifying options such as the desired format (e.g., `cyclonedx1.6+json`) and the target organization.",
+ "cellName": "User Executes `snyk sbom` Command - sbom.md:L284-285",
+ "cellId": "f5274edb-f76d-406c-b9f5-b48eaff595ef",
+ "visible": true,
+ "startLine": 284,
+ "endLine": 285,
+ "parentCellId": "2a94082d-8e68-4e8c-b792-def89c69a845",
+ "parentPath": "snyk-cli-b8d7f01/help/cli-commands/sbom.md"
+ },
+ "83264e21-3db1-4eb0-8051-8edd66d6b78d": {
+ "path": "83264e21-3db1-4eb0-8051-8edd66d6b78d",
+ "cellName": "CLI Analyzes Project Dependencies - sbom.md:L24",
+ "cellId": "83264e21-3db1-4eb0-8051-8edd66d6b78d",
+ "visible": true,
+ "parentCellId": "2a94082d-8e68-4e8c-b792-def89c69a845"
+ },
+ "snyk-cli-b8d7f01/help/cli-commands/sbom.md-simstep-e169da2c-940a-4ce4-b955-43cccdc9a50b": {
+ "path": "snyk-cli-b8d7f01/help/cli-commands/sbom.md-simstep-e169da2c-940a-4ce4-b955-43cccdc9a50b",
+ "fileName": "sbom.md",
+ "wiki": "The Snyk CLI parses the arguments and initiates a scan of the local project directory. It identifies manifest files (e.g., package.json, pom.xml) and builds an internal dependency graph representing the project's structure, similar to a `snyk test` operation.",
+ "cellName": "CLI Analyzes Project Dependencies - sbom.md:L24",
+ "cellId": "83264e21-3db1-4eb0-8051-8edd66d6b78d",
+ "visible": true,
+ "startLine": 24,
+ "endLine": 24,
+ "parentCellId": "2a94082d-8e68-4e8c-b792-def89c69a845",
+ "parentPath": "snyk-cli-b8d7f01/help/cli-commands/sbom.md"
+ },
+ "a0cfde3b-55f7-4796-995d-c4bb71a82047": {
+ "path": "a0cfde3b-55f7-4796-995d-c4bb71a82047",
+ "cellName": "Snyk API Generates SBOM Document - fake-server.ts:L986-1032",
+ "cellId": "a0cfde3b-55f7-4796-995d-c4bb71a82047",
+ "visible": true,
+ "parentCellId": "abbe9a10-c7b1-40f9-acf0-236755130bef"
+ },
+ "snyk-cli-b8d7f01/test/acceptance/fake-server.ts-simstep-f671fc80-497a-4f02-aa7d-2268e86d8a04": {
+ "path": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts-simstep-f671fc80-497a-4f02-aa7d-2268e86d8a04",
+ "fileName": "fake-server.ts",
+ "wiki": "The Snyk backend service receives the dependency graph, processes it, and constructs the SBOM document in the requested format (e.g., CycloneDX or SPDX), populating component details, relationships, and metadata.",
+ "cellName": "Snyk API Generates SBOM Document - fake-server.ts:L986-1032",
+ "cellId": "a0cfde3b-55f7-4796-995d-c4bb71a82047",
+ "visible": true,
+ "startLine": 986,
+ "endLine": 1032,
+ "parentCellId": "abbe9a10-c7b1-40f9-acf0-236755130bef",
+ "parentPath": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts"
+ },
+ "fd60fa14-6a9b-4f02-8842-31194f713045": {
+ "path": "fd60fa14-6a9b-4f02-8842-31194f713045",
+ "cellName": "CLI Receives and Parses SBOM - sbom.spec.ts:L53-56",
+ "cellId": "fd60fa14-6a9b-4f02-8842-31194f713045",
+ "visible": true,
+ "parentCellId": "6fde9c8f-c276-42ae-8343-b7160512d3f4"
+ },
+ "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts-simstep-da6075bd-7a85-4ca3-b85f-459cf4d7dc81": {
+ "path": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts-simstep-da6075bd-7a85-4ca3-b85f-459cf4d7dc81",
+ "fileName": "sbom.spec.ts",
+ "wiki": "The Snyk CLI receives the HTTP response from the API, extracts the raw SBOM document from the response body, and parses it into an in-memory object.",
+ "cellName": "CLI Receives and Parses SBOM - sbom.spec.ts:L53-56",
+ "cellId": "fd60fa14-6a9b-4f02-8842-31194f713045",
+ "visible": true,
+ "startLine": 53,
+ "endLine": 56,
+ "parentCellId": "6fde9c8f-c276-42ae-8343-b7160512d3f4",
+ "parentPath": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts"
+ },
+ "f33f5035-43b2-4f08-a48d-00f74a767f82": {
+ "path": "f33f5035-43b2-4f08-a48d-00f74a767f82",
+ "cellName": "Final SBOM is Displayed or Saved - sbom.spec.ts:L101-104",
+ "cellId": "f33f5035-43b2-4f08-a48d-00f74a767f82",
+ "visible": true,
+ "parentCellId": "6fde9c8f-c276-42ae-8343-b7160512d3f4"
+ },
+ "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts-simstep-f044fa90-9219-4a05-94db-836fca272120": {
+ "path": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts-simstep-f044fa90-9219-4a05-94db-836fca272120",
+ "fileName": "sbom.spec.ts",
+ "wiki": "The final SBOM is either displayed in the user's terminal via standard output or saved to the specified file on disk, completing the process and providing the user with their Software Bill of Materials.",
+ "cellName": "Final SBOM is Displayed or Saved - sbom.spec.ts:L101-104",
+ "cellId": "f33f5035-43b2-4f08-a48d-00f74a767f82",
+ "visible": true,
+ "startLine": 101,
+ "endLine": 104,
+ "parentCellId": "6fde9c8f-c276-42ae-8343-b7160512d3f4",
+ "parentPath": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts"
+ },
+ "20667550-4ae5-486b-8711-f032d1ab608e": {
+ "path": "20667550-4ae5-486b-8711-f032d1ab608e",
+ "cellName": "Command Arguments\nPassed to\nCLI",
+ "cellId": "20667550-4ae5-486b-8711-f032d1ab608e",
+ "visible": true,
+ "parentCellId": "2a94082d-8e68-4e8c-b792-def89c69a845"
+ },
+ "generated-edge-simstep-2b2d61a1-4c9b-4c4e-b6d6-72f04ced24eb-20667550-4ae5-486b-8711-f032d1ab608e": {
+ "path": "generated-edge-simstep-2b2d61a1-4c9b-4c4e-b6d6-72f04ced24eb-20667550-4ae5-486b-8711-f032d1ab608e",
+ "fileName": "sbom.md",
+ "cellName": "Command Arguments Passed to CLI",
+ "cellId": "20667550-4ae5-486b-8711-f032d1ab608e",
+ "visible": true,
+ "startLine": 45,
+ "endLine": 51,
+ "parentPath": "snyk-cli-b8d7f01/help/cli-commands/sbom.md"
+ },
+ "0aebc819-85e7-40ab-8cb2-f838a2ed0a9c": {
+ "path": "0aebc819-85e7-40ab-8cb2-f838a2ed0a9c",
+ "cellName": "Dependency Data\nSent to\nSnyk API",
+ "cellId": "0aebc819-85e7-40ab-8cb2-f838a2ed0a9c",
+ "visible": true,
+ "parentCellId": "4fb5aa03-806c-47d2-a809-54ed8897ebe1"
+ },
+ "generated-edge-simstep-73b2957d-2316-4aa5-805f-f9c55657cfc8-0aebc819-85e7-40ab-8cb2-f838a2ed0a9c": {
+ "path": "generated-edge-simstep-73b2957d-2316-4aa5-805f-f9c55657cfc8-0aebc819-85e7-40ab-8cb2-f838a2ed0a9c",
+ "fileName": "sbom.md",
+ "cellName": "Dependency Data Sent to Snyk API",
+ "cellId": "0aebc819-85e7-40ab-8cb2-f838a2ed0a9c",
+ "visible": true,
+ "startLine": 838,
+ "endLine": 838,
+ "parentPath": "snyk-cli-b8d7f01/help/cli-commands/sbom.md"
+ },
+ "1925d126-8d72-41a7-bdeb-f684048e2171": {
+ "path": "1925d126-8d72-41a7-bdeb-f684048e2171",
+ "cellName": "SBOM Document\nReturned to\nCLI",
+ "cellId": "1925d126-8d72-41a7-bdeb-f684048e2171",
+ "visible": true,
+ "parentCellId": "e94dd5ce-8526-4f27-861e-e75f70441446"
+ },
+ "generated-edge-simstep-935d8cbe-5c95-4fbb-aa94-01907c955999-1925d126-8d72-41a7-bdeb-f684048e2171": {
+ "path": "generated-edge-simstep-935d8cbe-5c95-4fbb-aa94-01907c955999-1925d126-8d72-41a7-bdeb-f684048e2171",
+ "fileName": "fake-server.ts",
+ "cellName": "SBOM Document Returned to CLI",
+ "cellId": "1925d126-8d72-41a7-bdeb-f684048e2171",
+ "visible": true,
+ "startLine": 1045,
+ "endLine": 1045,
+ "parentPath": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts"
+ },
+ "4ceea819-453f-46ca-9504-f7f7e7525095": {
+ "path": "4ceea819-453f-46ca-9504-f7f7e7525095",
+ "cellName": "SBOM Data\nTransmitted to\nOutput Stream",
+ "cellId": "4ceea819-453f-46ca-9504-f7f7e7525095",
+ "visible": true,
+ "parentCellId": "6fde9c8f-c276-42ae-8343-b7160512d3f4"
+ },
+ "generated-edge-simstep-82ded9a2-d928-4676-98d2-123b4d7e18aa-4ceea819-453f-46ca-9504-f7f7e7525095": {
+ "path": "generated-edge-simstep-82ded9a2-d928-4676-98d2-123b4d7e18aa-4ceea819-453f-46ca-9504-f7f7e7525095",
+ "fileName": "sbom.spec.ts",
+ "cellName": "SBOM Data Transmitted to Output Stream",
+ "cellId": "4ceea819-453f-46ca-9504-f7f7e7525095",
+ "visible": true,
+ "startLine": 93,
+ "endLine": 99,
+ "parentPath": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts"
+ },
+ "dee71ff9-9f20-483b-b323-e2a5309868ef": {
+ "path": "dee71ff9-9f20-483b-b323-e2a5309868ef",
+ "cellName": "lib",
+ "cellId": "dee71ff9-9f20-483b-b323-e2a5309868ef",
+ "visible": true,
+ "parentCellId": "85cfde81-a717-45ef-8a87-7933eb33aaa4",
+ "children": [
+ "snyk-cli-b8d7f01/src/lib/formatters",
+ "snyk-cli-b8d7f01/src/lib/policy",
+ "snyk-cli-b8d7f01/src/lib/snyk-test"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/lib": {
+ "path": "snyk-cli-b8d7f01/src/lib",
+ "fileName": "lib",
+ "cellName": "lib",
+ "cellId": "dee71ff9-9f20-483b-b323-e2a5309868ef",
+ "visible": true,
+ "parentCellId": "85cfde81-a717-45ef-8a87-7933eb33aaa4"
+ },
+ "53a7517a-bd53-44fe-b38b-d41992699829": {
+ "path": "53a7517a-bd53-44fe-b38b-d41992699829",
+ "cellName": "main.ts",
+ "cellId": "53a7517a-bd53-44fe-b38b-d41992699829",
+ "visible": true,
+ "parentCellId": "35b595f8-07a0-4381-8583-2864f74392cb"
+ },
+ "e8af420a-217e-47a5-ae8c-a56d92a08527": {
+ "path": "e8af420a-217e-47a5-ae8c-a56d92a08527",
+ "cellName": "formatters",
+ "cellId": "e8af420a-217e-47a5-ae8c-a56d92a08527",
+ "visible": true,
+ "parentCellId": "dee71ff9-9f20-483b-b323-e2a5309868ef",
+ "children": [
+ "snyk-cli-b8d7f01/src/lib/formatters/test"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/lib/formatters": {
+ "path": "snyk-cli-b8d7f01/src/lib/formatters",
+ "fileName": "formatters",
+ "cellName": "formatters",
+ "cellId": "e8af420a-217e-47a5-ae8c-a56d92a08527",
+ "visible": true,
+ "parentCellId": "dee71ff9-9f20-483b-b323-e2a5309868ef"
+ },
+ "6e65834a-7297-4c37-adcc-773907c98314": {
+ "path": "6e65834a-7297-4c37-adcc-773907c98314",
+ "cellName": "types.ts",
+ "cellId": "6e65834a-7297-4c37-adcc-773907c98314",
+ "visible": true,
+ "parentCellId": "53827863-cec6-4af5-a0c9-b4e71516e392"
+ },
+ "f1c3c149-991f-43e6-8f1b-4cfff7de36ce": {
+ "path": "f1c3c149-991f-43e6-8f1b-4cfff7de36ce",
+ "cellName": "test",
+ "cellId": "f1c3c149-991f-43e6-8f1b-4cfff7de36ce",
+ "visible": true,
+ "parentCellId": "e8af420a-217e-47a5-ae8c-a56d92a08527",
+ "children": [
+ "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/lib/formatters/test": {
+ "path": "snyk-cli-b8d7f01/src/lib/formatters/test",
+ "fileName": "test",
+ "cellName": "test",
+ "cellId": "f1c3c149-991f-43e6-8f1b-4cfff7de36ce",
+ "visible": true,
+ "parentCellId": "e8af420a-217e-47a5-ae8c-a56d92a08527"
+ },
+ "a2b82ea8-7b7c-48b2-b06e-bbf26f4c89a4": {
+ "path": "a2b82ea8-7b7c-48b2-b06e-bbf26f4c89a4",
+ "cellName": "format-test-results.ts",
+ "cellId": "a2b82ea8-7b7c-48b2-b06e-bbf26f4c89a4",
+ "visible": true,
+ "parentCellId": "f1c3c149-991f-43e6-8f1b-4cfff7de36ce"
+ },
+ "04752c41-0bf0-482f-8cce-3a89abba9b44": {
+ "path": "04752c41-0bf0-482f-8cce-3a89abba9b44",
+ "cellName": "Parse and Validate CLI Arguments - main.ts:L452-456",
+ "cellId": "04752c41-0bf0-482f-8cce-3a89abba9b44",
+ "visible": true,
+ "parentCellId": "53a7517a-bd53-44fe-b38b-d41992699829"
+ },
+ "snyk-cli-b8d7f01/src/cli/main.ts-simstep-e7cd21df-d14a-4a0c-8a15-cfbadc5b7d39": {
+ "path": "snyk-cli-b8d7f01/src/cli/main.ts-simstep-e7cd21df-d14a-4a0c-8a15-cfbadc5b7d39",
+ "fileName": "main.ts",
+ "wiki": "The Snyk CLI is executed with command-line arguments. The `main.ts` entrypoint parses these arguments and invokes `validateCommand` to ensure the provided option combinations are supported. For instance, it verifies that `--json-file-output` is used with a supported command like 'test'.",
+ "cellName": "Parse and Validate CLI Arguments - main.ts:L452-456",
+ "cellId": "04752c41-0bf0-482f-8cce-3a89abba9b44",
+ "visible": true,
+ "startLine": 452,
+ "endLine": 456,
+ "parentCellId": "53a7517a-bd53-44fe-b38b-d41992699829",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/main.ts"
+ },
+ "498c33dc-49df-4015-bace-3cfd51ddbd44": {
+ "path": "498c33dc-49df-4015-bace-3cfd51ddbd44",
+ "cellName": "Format Scan Results - format-test-results.ts:L116-118",
+ "cellId": "498c33dc-49df-4015-bace-3cfd51ddbd44",
+ "visible": true,
+ "parentCellId": "a2b82ea8-7b7c-48b2-b06e-bbf26f4c89a4"
+ },
+ "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts-simstep-58f1dcbe-41e0-4f29-bb87-253c6f14ffa0": {
+ "path": "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts-simstep-58f1dcbe-41e0-4f29-bb87-253c6f14ffa0",
+ "fileName": "format-test-results.ts",
+ "wiki": "After the scan completes, the raw results are processed by `formatTestResults`. Based on the presence of `--json` or `--json-file-output` flags in the options, this function serializes the result data into a JSON string using `jsonStringifyLargeObject`.",
+ "cellName": "Format Scan Results - format-test-results.ts:L116-118",
+ "cellId": "498c33dc-49df-4015-bace-3cfd51ddbd44",
+ "visible": true,
+ "startLine": 116,
+ "endLine": 118,
+ "parentCellId": "a2b82ea8-7b7c-48b2-b06e-bbf26f4c89a4",
+ "parentPath": "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts"
+ },
+ "250f5cc5-58f7-47e0-b6e0-eba4e8fdbb43": {
+ "path": "250f5cc5-58f7-47e0-b6e0-eba4e8fdbb43",
+ "cellName": "Process and Dispatch Command Result - main.ts:L83-87",
+ "cellId": "250f5cc5-58f7-47e0-b6e0-eba4e8fdbb43",
+ "visible": true,
+ "parentCellId": "53a7517a-bd53-44fe-b38b-d41992699829"
+ },
+ "snyk-cli-b8d7f01/src/cli/main.ts-simstep-f37c67d6-73f0-41c2-9f61-241dad33c1da": {
+ "path": "snyk-cli-b8d7f01/src/cli/main.ts-simstep-f37c67d6-73f0-41c2-9f61-241dad33c1da",
+ "fileName": "main.ts",
+ "wiki": "The main CLI function receives the `TestCommandResult`. It extracts the stringified JSON and SARIF results and calls `saveResultsToFile` for both formats. This function acts as a dispatcher, determining if a file needs to be written based on the user's options.",
+ "cellName": "Process and Dispatch Command Result - main.ts:L83-87",
+ "cellId": "250f5cc5-58f7-47e0-b6e0-eba4e8fdbb43",
+ "visible": true,
+ "startLine": 83,
+ "endLine": 87,
+ "parentCellId": "53a7517a-bd53-44fe-b38b-d41992699829",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/main.ts"
+ },
+ "a2fda714-66da-4da2-bec7-56912f90a421": {
+ "path": "a2fda714-66da-4da2-bec7-56912f90a421",
+ "cellName": "Write Report to File - main.ts:L241-267",
+ "cellId": "a2fda714-66da-4da2-bec7-56912f90a421",
+ "visible": true,
+ "parentCellId": "53a7517a-bd53-44fe-b38b-d41992699829"
+ },
+ "snyk-cli-b8d7f01/src/cli/main.ts-simstep-e12b444d-aecf-4f5b-840d-f71e82e84bf3": {
+ "path": "snyk-cli-b8d7f01/src/cli/main.ts-simstep-e12b444d-aecf-4f5b-840d-f71e82e84bf3",
+ "fileName": "main.ts",
+ "wiki": "The `saveJsonToFile` function receives the final filename and the stringified JSON content. If the content is not empty, it uses file system operations to write the string to the specified file, creating the machine-readable report.",
+ "cellName": "Write Report to File - main.ts:L241-267",
+ "cellId": "a2fda714-66da-4da2-bec7-56912f90a421",
+ "visible": true,
+ "startLine": 241,
+ "endLine": 267,
+ "parentCellId": "53a7517a-bd53-44fe-b38b-d41992699829",
+ "parentPath": "snyk-cli-b8d7f01/src/cli/main.ts"
+ },
+ "9d310562-b441-41d6-a9a8-61adaa8e602c": {
+ "path": "9d310562-b441-41d6-a9a8-61adaa8e602c",
+ "cellName": "Pass Options\nto Command\nHandler",
+ "cellId": "9d310562-b441-41d6-a9a8-61adaa8e602c",
+ "visible": true,
+ "parentCellId": "85cfde81-a717-45ef-8a87-7933eb33aaa4"
+ },
+ "generated-edge-simstep-705c5c99-7b5c-4dfa-8307-1d80c71c4fc0-9d310562-b441-41d6-a9a8-61adaa8e602c": {
+ "path": "generated-edge-simstep-705c5c99-7b5c-4dfa-8307-1d80c71c4fc0-9d310562-b441-41d6-a9a8-61adaa8e602c",
+ "fileName": "main.ts",
+ "cellName": "Pass Options to Command Handler",
+ "cellId": "9d310562-b441-41d6-a9a8-61adaa8e602c",
+ "visible": true,
+ "startLine": 83,
+ "endLine": 87,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/main.ts"
+ },
+ "64fa27e1-0d36-45c3-80d7-6db373bc6736": {
+ "path": "64fa27e1-0d36-45c3-80d7-6db373bc6736",
+ "cellName": "Package Formatted\nResults",
+ "cellId": "64fa27e1-0d36-45c3-80d7-6db373bc6736",
+ "visible": true,
+ "parentCellId": "85cfde81-a717-45ef-8a87-7933eb33aaa4"
+ },
+ "generated-edge-simstep-3226af83-a2f7-4aa8-b9fc-9250a63a0c20-64fa27e1-0d36-45c3-80d7-6db373bc6736": {
+ "path": "generated-edge-simstep-3226af83-a2f7-4aa8-b9fc-9250a63a0c20-64fa27e1-0d36-45c3-80d7-6db373bc6736",
+ "fileName": "format-test-results.ts",
+ "cellName": "Package Formatted Results",
+ "cellId": "64fa27e1-0d36-45c3-80d7-6db373bc6736",
+ "visible": true,
+ "startLine": 70,
+ "endLine": 83,
+ "parentPath": "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts"
+ },
+ "18235737-3e12-4898-be1b-250a039ccf85": {
+ "path": "18235737-3e12-4898-be1b-250a039ccf85",
+ "cellName": "Transmit Data\nto File\nWriter",
+ "cellId": "18235737-3e12-4898-be1b-250a039ccf85",
+ "visible": true,
+ "parentCellId": "53a7517a-bd53-44fe-b38b-d41992699829"
+ },
+ "generated-edge-simstep-c3e2b026-20c8-4c0a-b008-095abca52d74-18235737-3e12-4898-be1b-250a039ccf85": {
+ "path": "generated-edge-simstep-c3e2b026-20c8-4c0a-b008-095abca52d74-18235737-3e12-4898-be1b-250a039ccf85",
+ "fileName": "main.ts",
+ "cellName": "Transmit Data to File Writer",
+ "cellId": "18235737-3e12-4898-be1b-250a039ccf85",
+ "visible": true,
+ "startLine": 480,
+ "endLine": 494,
+ "parentPath": "snyk-cli-b8d7f01/src/cli/main.ts"
+ },
+ "79ea1c0b-29c7-45f0-96a0-0c38ddc37ae9": {
+ "path": "79ea1c0b-29c7-45f0-96a0-0c38ddc37ae9",
+ "cellName": "policy",
+ "cellId": "79ea1c0b-29c7-45f0-96a0-0c38ddc37ae9",
+ "visible": true,
+ "parentCellId": "dee71ff9-9f20-483b-b323-e2a5309868ef",
+ "children": [
+ "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/lib/policy": {
+ "path": "snyk-cli-b8d7f01/src/lib/policy",
+ "fileName": "policy",
+ "cellName": "policy",
+ "cellId": "79ea1c0b-29c7-45f0-96a0-0c38ddc37ae9",
+ "visible": true,
+ "parentCellId": "dee71ff9-9f20-483b-b323-e2a5309868ef"
+ },
+ "2c16b46f-4304-49df-9564-85bde1cc5b30": {
+ "path": "2c16b46f-4304-49df-9564-85bde1cc5b30",
+ "cellName": "snyk-test",
+ "cellId": "2c16b46f-4304-49df-9564-85bde1cc5b30",
+ "visible": true,
+ "parentCellId": "dee71ff9-9f20-483b-b323-e2a5309868ef",
+ "children": [
+ "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts"
+ ]
+ },
+ "snyk-cli-b8d7f01/src/lib/snyk-test": {
+ "path": "snyk-cli-b8d7f01/src/lib/snyk-test",
+ "fileName": "snyk-test",
+ "cellName": "snyk-test",
+ "cellId": "2c16b46f-4304-49df-9564-85bde1cc5b30",
+ "visible": true,
+ "parentCellId": "dee71ff9-9f20-483b-b323-e2a5309868ef"
+ },
+ "31bdaa23-2cd5-490c-8543-b3416ce603fa": {
+ "path": "31bdaa23-2cd5-490c-8543-b3416ce603fa",
+ "cellName": "find-and-load-policy.ts",
+ "cellId": "31bdaa23-2cd5-490c-8543-b3416ce603fa",
+ "visible": true,
+ "parentCellId": "79ea1c0b-29c7-45f0-96a0-0c38ddc37ae9"
+ },
+ "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f": {
+ "path": "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f",
+ "cellName": "run-test.ts",
+ "cellId": "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f",
+ "visible": true,
+ "parentCellId": "2c16b46f-4304-49df-9564-85bde1cc5b30"
+ },
+ "b872abf0-9951-4faf-9d16-8ebcdf7dea58": {
+ "path": "b872abf0-9951-4faf-9d16-8ebcdf7dea58",
+ "cellName": "Policy Discovery: Locate and Load .snyk File - find-and-load-policy.ts:L14-54",
+ "cellId": "b872abf0-9951-4faf-9d16-8ebcdf7dea58",
+ "visible": true,
+ "parentCellId": "31bdaa23-2cd5-490c-8543-b3416ce603fa"
+ },
+ "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts-simstep-75f10feb-80fe-4a6c-8622-902f5cd7d812": {
+ "path": "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts-simstep-75f10feb-80fe-4a6c-8622-902f5cd7d812",
+ "fileName": "find-and-load-policy.ts",
+ "wiki": "When a scan command like `snyk test` is initiated, the CLI first searches for a `.snyk` policy file. The `findAndLoadPolicy` function orchestrates this by checking for a path specified via the `--policy-path` option, or otherwise looking in the project's root directory. It then uses the `snyk-policy` library to read and parse the YAML file into a structured policy object.",
+ "cellName": "Policy Discovery: Locate and Load .snyk File - find-and-load-policy.ts:L14-54",
+ "cellId": "b872abf0-9951-4faf-9d16-8ebcdf7dea58",
+ "visible": true,
+ "startLine": 14,
+ "endLine": 54,
+ "parentCellId": "31bdaa23-2cd5-490c-8543-b3416ce603fa",
+ "parentPath": "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts"
+ },
+ "687c1238-f8cd-46b1-9f08-8dd609866724": {
+ "path": "687c1238-f8cd-46b1-9f08-8dd609866724",
+ "cellName": "API Payload Preparation: Attach Policy to Request - run-test.ts:L824",
+ "cellId": "687c1238-f8cd-46b1-9f08-8dd609866724",
+ "visible": true,
+ "parentCellId": "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f"
+ },
+ "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts-simstep-cf4028f1-9fdf-43d6-b653-4429a498c884": {
+ "path": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts-simstep-cf4028f1-9fdf-43d6-b653-4429a498c884",
+ "fileName": "run-test.ts",
+ "wiki": "Before sending the project's dependency data to the Snyk API, the CLI serializes the loaded policy object back into a string and includes it in the API request payload. This informs the Snyk backend of the local ignore rules during the analysis.",
+ "cellName": "API Payload Preparation: Attach Policy to Request - run-test.ts:L824",
+ "cellId": "687c1238-f8cd-46b1-9f08-8dd609866724",
+ "visible": true,
+ "startLine": 824,
+ "endLine": 824,
+ "parentCellId": "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f",
+ "parentPath": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts"
+ },
+ "a772fd68-6c56-4a80-bd7d-baeecf733f5d": {
+ "path": "a772fd68-6c56-4a80-bd7d-baeecf733f5d",
+ "cellName": "Policy Application: Filter Vulnerabilities Locally - run-test.ts:L480-484",
+ "cellId": "a772fd68-6c56-4a80-bd7d-baeecf733f5d",
+ "visible": true,
+ "parentCellId": "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f"
+ },
+ "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts-simstep-5a85d419-6e13-494a-98ad-93ec19bbd313": {
+ "path": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts-simstep-5a85d419-6e13-494a-98ad-93ec19bbd313",
+ "fileName": "run-test.ts",
+ "wiki": "After receiving the API response, the CLI performs a final client-side filtering step unless `--ignore-policy` is used. It re-parses the policy string from the response using `snykPolicy.loadFromText` and then calls the `policy.filter()` method. This method iterates through the vulnerabilities and removes any that match the `ignore` rules, thereby suppressing them from the final report.",
+ "cellName": "Policy Application: Filter Vulnerabilities Locally - run-test.ts:L480-484",
+ "cellId": "a772fd68-6c56-4a80-bd7d-baeecf733f5d",
+ "visible": true,
+ "startLine": 480,
+ "endLine": 484,
+ "parentCellId": "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f",
+ "parentPath": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts"
+ },
+ "a08ccc2e-befb-46ae-833d-abdc919216a5": {
+ "path": "a08ccc2e-befb-46ae-833d-abdc919216a5",
+ "cellName": "Data Transmission:\nPass Policy\nto Test\nRunner",
+ "cellId": "a08ccc2e-befb-46ae-833d-abdc919216a5",
+ "visible": true,
+ "parentCellId": "dee71ff9-9f20-483b-b323-e2a5309868ef"
+ },
+ "generated-edge-simstep-31d0b0f0-0b46-4709-994a-3ab86171d54e-a08ccc2e-befb-46ae-833d-abdc919216a5": {
+ "path": "generated-edge-simstep-31d0b0f0-0b46-4709-994a-3ab86171d54e-a08ccc2e-befb-46ae-833d-abdc919216a5",
+ "fileName": "find-and-load-policy.ts",
+ "cellName": "Data Transmission: Pass Policy to Test Runner",
+ "cellId": "a08ccc2e-befb-46ae-833d-abdc919216a5",
+ "visible": true,
+ "startLine": 764,
+ "endLine": 768,
+ "parentPath": "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts"
+ },
+ "1f236d2c-b624-4f63-a48f-493622977624": {
+ "path": "1f236d2c-b624-4f63-a48f-493622977624",
+ "cellName": "API Communication:\nReceive Scan\nResults",
+ "cellId": "1f236d2c-b624-4f63-a48f-493622977624",
+ "visible": true,
+ "parentCellId": "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f"
+ },
+ "generated-edge-simstep-7b1d9946-136c-468b-b75d-15e4b65cf46d-1f236d2c-b624-4f63-a48f-493622977624": {
+ "path": "generated-edge-simstep-7b1d9946-136c-468b-b75d-15e4b65cf46d-1f236d2c-b624-4f63-a48f-493622977624",
+ "fileName": "run-test.ts",
+ "cellName": "API Communication: Receive Scan Results",
+ "cellId": "1f236d2c-b624-4f63-a48f-493622977624",
+ "visible": true,
+ "startLine": 470,
+ "endLine": 470,
+ "parentPath": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts"
+ }
+ },
+ "simulations": {
+ "Scan open-source dependencies for vulnerabilities and license issues": {
+ "name": "Scan open-source dependencies for vulnerabilities and license issues",
+ "simSteps": [
+ {
+ "simStepId": "33e58eb3-d814-420e-8b30-6193facab1eb",
+ "diagramNodeId": "cd9c671a-2673-44bb-af50-6d363f4c8e96",
+ "simStepLabel": "User Initiates Scan",
+ "simStepDescription": "A user runs the `snyk test` command in their project's root directory. The command-line arguments are captured by the CLI's main entry point.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/index.ts",
+ "startLine": "18",
+ "endLine": "23",
+ "relevantVariables": [
+ "cli.execute"
+ ]
+ },
+ "inputDataExample": "{\n \"command\": \"snyk test\",\n \"workingDirectory\": \"/Users/dev/my-npm-project\"\n}",
+ "outputDataExample": "{\n \"command\": \"test\",\n \"paths\": [\n \"/Users/dev/my-npm-project\"\n ],\n \"options\": {\n \"path\": \"/Users/dev/my-npm-project\"\n }\n}"
+ },
+ {
+ "simStepId": "ab2cfd18-b8a9-40b6-938c-a2e83f754024",
+ "diagramNodeId": "bb823e65-fbfd-4b67-92cb-5c30c3b14e63",
+ "simStepLabel": "Command Dispatch",
+ "simStepDescription": "The parsed command and options are passed from the main CLI handler to the specific command's execution logic.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/args.ts",
+ "startLine": "123",
+ "endLine": "127",
+ "relevantVariables": [
+ "cli",
+ "command"
+ ]
+ },
+ "inputDataExample": "{\n \"command\": \"test\",\n \"paths\": [\n \"/Users/dev/my-npm-project\"\n ],\n \"options\": {\n \"path\": \"/Users/dev/my-npm-project\"\n }\n}",
+ "outputDataExample": "{\n \"command\": \"test\",\n \"paths\": [\n \"/Users/dev/my-npm-project\"\n ],\n \"options\": {\n \"path\": \"/Users/dev/my-npm-project\"\n }\n}"
+ },
+ {
+ "simStepId": "50b3698d-b5c8-419c-a9d7-7f8a1eff33d5",
+ "diagramNodeId": "3c999446-05f8-4cee-9b80-054fa65cdef0",
+ "simStepLabel": "Initialize Test Command",
+ "simStepDescription": "The `test` command module is invoked. It sets default options, validates credentials and arguments, and prepares for the scan. For Open Source scans, it determines which package manager to use.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/commands/test/index.ts",
+ "startLine": "70",
+ "endLine": "73",
+ "relevantVariables": [
+ "test",
+ "processCommandArgs"
+ ]
+ },
+ "inputDataExample": "{\n \"paths\": [\n \"/Users/dev/my-npm-project\"\n ],\n \"options\": {\n \"path\": \"/Users/dev/my-npm-project\"\n }\n}",
+ "outputDataExample": "{\n \"options\": {\n \"path\": \"/Users/dev/my-npm-project\",\n \"packageManager\": \"npm\",\n \"dev\": false\n },\n \"paths\": [\n \"/Users/dev/my-npm-project\"\n ]\n}"
+ },
+ {
+ "simStepId": "aea45172-6cbe-4f27-8c31-f6c2656c1012",
+ "diagramNodeId": "6e5909fc-2d5e-4bcd-a631-2f92b6604e96",
+ "simStepLabel": "Request Dependency Graph",
+ "simStepDescription": "The test command invokes the plugin system to analyze the project's manifest files and construct a dependency graph.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/legacy.ts",
+ "startLine": "59",
+ "endLine": "62",
+ "relevantVariables": [
+ "plugins.getMultiPluginResult"
+ ]
+ },
+ "inputDataExample": "{\n \"options\": {\n \"path\": \"/Users/dev/my-npm-project\",\n \"packageManager\": \"npm\",\n \"dev\": false\n },\n \"paths\": [\n \"/Users/dev/my-npm-project\"\n ]\n}",
+ "outputDataExample": "{\n \"options\": {\n \"path\": \"/Users/dev/my-npm-project\",\n \"packageManager\": \"npm\",\n \"dev\": false\n },\n \"paths\": [\n \"/Users/dev/my-npm-project\"\n ]\n}"
+ },
+ {
+ "simStepId": "be1c90e1-fd80-4037-980c-d28be03398b6",
+ "diagramNodeId": "13d92073-022e-4f7c-bcbb-aebdda685f95",
+ "simStepLabel": "Build Dependency Graph",
+ "simStepDescription": "The appropriate plugin (e.g., nodejs-plugin for npm/yarn) is loaded. It inspects manifest files like `package.json` and `package-lock.json` to build a detailed dependency graph.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/index.ts",
+ "startLine": "78",
+ "endLine": "84",
+ "relevantVariables": [
+ "getMultiPluginResult",
+ "loadPlugin"
+ ]
+ },
+ "inputDataExample": "{\n \"path\": \"/Users/dev/my-npm-project\",\n \"packageManager\": \"npm\"\n}",
+ "outputDataExample": "{\n \"depGraph\": {\n \"schemaVersion\": \"1.2.0\",\n \"pkgManager\": {\n \"name\": \"npm\"\n },\n \"pkgs\": [\n {\n \"id\": \"my-npm-project@1.0.0\",\n \"info\": {\n \"name\": \"my-npm-project\",\n \"version\": \"1.0.0\"\n }\n },\n {\n \"id\": \"lodash@4.17.20\",\n \"info\": {\n \"name\": \"lodash\",\n \"version\": \"4.17.20\"\n }\n }\n ],\n \"graph\": {\n \"rootNodeId\": \"root-node\",\n \"nodes\": [\n {\n \"nodeId\": \"root-node\",\n \"pkgId\": \"my-npm-project@1.0.0\",\n \"deps\": [{\n \"nodeId\": \"lodash@4.17.20\"\n }]\n },\n {\n \"nodeId\": \"lodash@4.17.20\",\n \"pkgId\": \"lodash@4.17.20\",\n \"deps\": []\n }\n ]\n }\n }\n}"
+ },
+ {
+ "simStepId": "aa16da24-1280-4114-9a41-cb469e2911dc",
+ "diagramNodeId": "ef86b2bd-4849-4d8e-a38a-faeb68cff554",
+ "simStepLabel": "Submit Dependency Graph for Analysis",
+ "simStepDescription": "The generated dependency graph is passed to the test runner, which assembles it into a payload to be sent to the Snyk API.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "141",
+ "endLine": "151",
+ "relevantVariables": [
+ "runTest",
+ "assembleEcosystemPayloads"
+ ]
+ },
+ "inputDataExample": "{\n \"pluginResult\": {\n \"package\": {\n \"name\": \"my-npm-project\",\n \"version\": \"1.0.0\",\n \"dependencies\": {\n \"lodash\": {\n \"name\": \"lodash\",\n \"version\": \"4.17.20\"\n }\n }\n },\n \"plugin\": {\n \"name\": \"snyk-nodejs-plugin\"\n }\n }\n}",
+ "outputDataExample": "{\n \"pluginResult\": {\n \"package\": {\n \"name\": \"my-npm-project\",\n \"version\": \"1.0.0\",\n \"dependencies\": {\n \"lodash\": {\n \"name\": \"lodash\",\n \"version\": \"4.17.20\"\n }\n }\n },\n \"plugin\": {\n \"name\": \"snyk-nodejs-plugin\"\n }\n }\n}"
+ },
+ {
+ "simStepId": "ff3a68d1-f59b-4605-9003-fa083a8db7e5",
+ "diagramNodeId": "12922438-a1a3-4615-be47-ce6af952ebe1",
+ "simStepLabel": "Send Analysis Request to Snyk API",
+ "simStepDescription": "The CLI sends the dependency graph payload to the Snyk API endpoint for vulnerability analysis. This is an HTTP POST request.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "184",
+ "endLine": "191",
+ "relevantVariables": [
+ "makeRequest"
+ ]
+ },
+ "inputDataExample": "{\n \"method\": \"POST\",\n \"url\": \"https://api.snyk.io/v1/test-dependencies\",\n \"body\": {\n \"depGraph\": {\n \"schemaVersion\": \"1.2.0\",\n \"pkgManager\": {\n \"name\": \"npm\"\n },\n \"pkgs\": [\n {\n \"id\": \"my-npm-project@1.0.0\",\n \"info\": {\n \"name\": \"my-npm-project\",\n \"version\": \"1.0.0\"\n }\n },\n {\n \"id\": \"lodash@4.17.20\",\n \"info\": {\n \"name\": \"lodash\",\n \"version\": \"4.17.20\"\n }\n }\n ],\n \"graph\": {\n \"rootNodeId\": \"root-node\",\n \"nodes\": [\n {\n \"nodeId\": \"root-node\",\n \"pkgId\": \"my-npm-project@1.0.0\",\n \"deps\": [{\n \"nodeId\": \"lodash@4.17.20\"\n }]\n },\n {\n \"nodeId\": \"lodash@4.17.20\",\n \"pkgId\": \"lodash@4.17.20\",\n \"deps\": []\n }\n ]\n }\n }\n }\n}",
+ "outputDataExample": "{\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-JS-LODASH-1040724\",\n \"packageName\": \"lodash\",\n \"version\": \"4.17.20\",\n \"severity\": \"high\",\n \"from\": [\n \"my-npm-project@1.0.0\",\n \"lodash@4.17.20\"\n ],\n \"upgradePath\": [\n false,\n \"lodash@4.17.21\"\n ]\n }\n ],\n \"ok\": false,\n \"dependencyCount\": 2\n}"
+ },
+ {
+ "simStepId": "d10fb181-5500-45a0-85b1-50040a07a97f",
+ "diagramNodeId": "4084b9c6-e000-4317-bfb8-b7b4eb72f979",
+ "simStepLabel": "Return Analysis Results",
+ "simStepDescription": "The Snyk API responds with a JSON object containing identified vulnerabilities, license issues, and remediation advice. This data is passed from the request layer to the formatting layer.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/legacy.ts",
+ "startLine": "86",
+ "endLine": "86",
+ "relevantVariables": [
+ "res"
+ ]
+ },
+ "inputDataExample": "{\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-JS-LODASH-1040724\",\n \"packageName\": \"lodash\",\n \"version\": \"4.17.20\",\n \"severity\": \"high\",\n \"from\": [\n \"my-npm-project@1.0.0\",\n \"lodash@4.17.20\"\n ],\n \"upgradePath\": [\n false,\n \"lodash@4.17.21\"\n ]\n }\n ],\n \"ok\": false,\n \"dependencyCount\": 2,\n \"org\": \"my-org\"\n}",
+ "outputDataExample": "{\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-JS-LODASH-1040724\",\n \"packageName\": \"lodash\",\n \"version\": \"4.17.20\",\n \"severity\": \"high\",\n \"from\": [\n \"my-npm-project@1.0.0\",\n \"lodash@4.17.20\"\n ],\n \"upgradePath\": [\n false,\n \"lodash@4.17.21\"\n ]\n }\n ],\n \"ok\": false,\n \"dependencyCount\": 2,\n \"org\": \"my-org\"\n}"
+ },
+ {
+ "simStepId": "f7c6a307-dea6-4edc-b753-c64875aa9384",
+ "diagramNodeId": "c717e177-bddb-4352-8a9e-5a03bcb666ef",
+ "simStepLabel": "Format and Display Results",
+ "simStepDescription": "The `display-result` formatter takes the structured API response and generates the human-readable report that is displayed in the user's terminal, including issue descriptions, paths, and remediation advice.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/formatters/test/display-result.ts",
+ "startLine": "27",
+ "endLine": "31",
+ "relevantVariables": [
+ "displayResult"
+ ]
+ },
+ "inputDataExample": "{\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-JS-LODASH-1040724\",\n \"packageName\": \"lodash\",\n \"version\": \"4.17.20\",\n \"severity\": \"high\",\n \"from\": [\n \"my-npm-project@1.0.0\",\n \"lodash@4.17.20\"\n ],\n \"upgradePath\": [\n false,\n \"lodash@4.17.21\"\n ]\n }\n ],\n \"ok\": false,\n \"dependencyCount\": 2,\n \"org\": \"my-org\",\n \"packageManager\": \"npm\",\n \"path\": \"/Users/dev/my-npm-project\"\n}",
+ "outputDataExample": "{\n \"formattedString\": \"\\nTesting /Users/dev/my-npm-project...\\n\\nTested 2 dependencies for known vulnerabilities, found 1 vulnerability.\\n\\nHigh severity vulnerability found in lodash\\n- Desc: Prototype Pollution in lodash\\n- Info: https://security.snyk.io/vuln/SNYK-JS-LODASH-1040724\\n- from: my-npm-project@1.0.0 > lodash@4.17.20\\nUpgrade lodash to version 4.17.21 to fix this issue.\\n\"\n}"
+ },
+ {
+ "simStepId": "7874c48f-39d8-460e-9179-6a4082441eb0",
+ "diagramNodeId": "e9f0e552-cd4a-4e87-9aef-5732c9ceb8da",
+ "simStepLabel": "Output to Console",
+ "simStepDescription": "The final formatted string is printed to the standard output for the user to see.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/index.ts",
+ "startLine": "119",
+ "endLine": "119",
+ "relevantVariables": [
+ "console.log"
+ ]
+ },
+ "inputDataExample": "{\n \"formattedString\": \"\\nTesting /Users/dev/my-npm-project...\\n\\nTested 2 dependencies for known vulnerabilities, found 1 vulnerability.\\n\\nHigh severity vulnerability found in lodash\\n- Desc: Prototype Pollution in lodash\\n- Info: https://security.snyk.io/vuln/SNYK-JS-LODASH-1040724\\n- from: my-npm-project@1.0.0 > lodash@4.17.20\\nUpgrade lodash to version 4.17.21 to fix this issue.\\n\"\n}",
+ "outputDataExample": "{\n \"formattedString\": \"\\nTesting /Users/dev/my-npm-project...\\n\\nTested 2 dependencies for known vulnerabilities, found 1 vulnerability.\\n\\nHigh severity vulnerability found in lodash\\n- Desc: Prototype Pollution in lodash\\n- Info: https://security.snyk.io/vuln/SNYK-JS-LODASH-1040724\\n- from: my-npm-project@1.0.0 > lodash@4.17.20\\nUpgrade lodash to version 4.17.21 to fix this issue.\\n\"\n}"
+ },
+ {
+ "simStepId": "13bd281a-d9bb-44ad-a014-b5f51f76aa80",
+ "diagramNodeId": "d1709c7d-bb03-47ec-9825-cdb64b39b6d0",
+ "simStepLabel": "Exit with Status Code",
+ "simStepDescription": "Based on the scan results, the CLI process exits with an appropriate status code. A non-zero exit code (typically 1) is used when vulnerabilities are found, which can be used to fail CI/CD pipelines.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/index.ts",
+ "startLine": "141",
+ "endLine": "151",
+ "relevantVariables": [
+ "process.exit"
+ ]
+ },
+ "inputDataExample": "{\n \"vulnerabilitiesFound\": true,\n \"errorOccurred\": false\n}",
+ "outputDataExample": "{\n \"exitCode\": 1\n}"
+ }
+ ],
+ "description": "- This is the core Software Composition Analysis (SCA) feature of the Snyk CLI
- - A user runs
snyk test in their project directory - - The CLI auto-detects the package manager (e
- g
- , npm, Maven, Pip), builds the full dependency graph, and sends it to the Snyk API for analysis
- - It then displays any found vulnerabilities, license issues, and provides actionable remediation advice, such as which version to upgrade to
- - This functionality is powered by a plugin system that supports a wide range of languages and package managers
",
+ "simulationNodesAndEdges": {
+ "cd9c671a-2673-44bb-af50-6d363f4c8e96": {
+ "simStepIds": [
+ "33e58eb3-d814-420e-8b30-6193facab1eb"
+ ]
+ },
+ "3c999446-05f8-4cee-9b80-054fa65cdef0": {
+ "simStepIds": [
+ "50b3698d-b5c8-419c-a9d7-7f8a1eff33d5"
+ ]
+ },
+ "13d92073-022e-4f7c-bcbb-aebdda685f95": {
+ "simStepIds": [
+ "be1c90e1-fd80-4037-980c-d28be03398b6"
+ ]
+ },
+ "12922438-a1a3-4615-be47-ce6af952ebe1": {
+ "simStepIds": [
+ "ff3a68d1-f59b-4605-9003-fa083a8db7e5"
+ ]
+ },
+ "c717e177-bddb-4352-8a9e-5a03bcb666ef": {
+ "simStepIds": [
+ "f7c6a307-dea6-4edc-b753-c64875aa9384"
+ ]
+ },
+ "d1709c7d-bb03-47ec-9825-cdb64b39b6d0": {
+ "simStepIds": [
+ "13bd281a-d9bb-44ad-a014-b5f51f76aa80"
+ ]
+ },
+ "bb823e65-fbfd-4b67-92cb-5c30c3b14e63": {
+ "simStepIds": [
+ "ab2cfd18-b8a9-40b6-938c-a2e83f754024"
+ ]
+ },
+ "6e5909fc-2d5e-4bcd-a631-2f92b6604e96": {
+ "simStepIds": [
+ "aea45172-6cbe-4f27-8c31-f6c2656c1012"
+ ]
+ },
+ "ef86b2bd-4849-4d8e-a38a-faeb68cff554": {
+ "simStepIds": [
+ "aa16da24-1280-4114-9a41-cb469e2911dc"
+ ]
+ },
+ "4084b9c6-e000-4317-bfb8-b7b4eb72f979": {
+ "simStepIds": [
+ "d10fb181-5500-45a0-85b1-50040a07a97f"
+ ]
+ },
+ "e9f0e552-cd4a-4e87-9aef-5732c9ceb8da": {
+ "simStepIds": [
+ "7874c48f-39d8-460e-9179-6a4082441eb0"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "snyk test, run-test, display-result",
+ "generationPrompt": "Scan open-source dependencies for vulnerabilities and license issues",
+ "generationKeywords": "snyk test, run-test, display-result"
+ },
+ "Scan application source code for security vulnerabilities (SAST)": {
+ "name": "Scan application source code for security vulnerabilities (SAST)",
+ "simSteps": [
+ {
+ "simStepId": "c8c7ee4e-8f17-4c1b-b813-d7f6d360e219",
+ "diagramNodeId": "85df9d5a-33e1-413b-ac31-8e6eda9f5517",
+ "simStepLabel": "SAST: User executes `snyk code test`",
+ "simStepDescription": "The user runs `snyk code test` against a local directory. The Snyk CLI identifies the 'code' command and dispatches it to the SAST plugin, which begins the testing process.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/index.ts",
+ "startLine": "31",
+ "endLine": "47",
+ "relevantVariables": [
+ "test",
+ "getSastSettings",
+ "getCodeTestResults",
+ "uuidv4"
+ ]
+ },
+ "inputDataExample": "{\"command\": \"snyk code test ./my-java-app\"}",
+ "outputDataExample": "{\"paths\": [\"./my-java-app\"], \"options\": {\"code\": true, \"path\": \"./my-java-app\"}}"
+ },
+ {
+ "simStepId": "63237123-ae0f-470f-96d6-3b052b9cd0f6",
+ "diagramNodeId": "177732a8-44c1-43c8-9aea-0ad57b01bcb4",
+ "simStepLabel": "SAST: Pass Command Options to SAST Plugin",
+ "simStepDescription": "The parsed command-line arguments and options are passed from the main CLI dispatcher to the SAST plugin's `test` function to configure the scan.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/index.ts",
+ "startLine": "31",
+ "endLine": "31",
+ "relevantVariables": [
+ "test",
+ "paths",
+ "options"
+ ]
+ },
+ "inputDataExample": "{\"paths\": [\"./my-java-app\"], \"options\": {\"code\": true, \"path\": \"./my-java-app\", \"severityThreshold\": \"high\"}}",
+ "outputDataExample": "{\"paths\": [\"./my-java-app\"], \"options\": {\"code\": true, \"path\": \"./my-java-app\", \"severityThreshold\": \"high\"}}"
+ },
+ {
+ "simStepId": "c6491e83-01e8-4cbe-b2b6-b7e276d682b0",
+ "diagramNodeId": "87fdb414-03a7-4944-9350-b2227ddf3890",
+ "simStepLabel": "SAST: Fetch Organization Settings",
+ "simStepDescription": "The SAST plugin checks if the Snyk Code feature is enabled for the user's organization by calling `getSastSettings`, which in turn makes an API request.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/settings.ts",
+ "startLine": "12",
+ "endLine": "54",
+ "relevantVariables": [
+ "getSastSettings",
+ "getSastSettingsForOrg",
+ "trackUsage"
+ ]
+ },
+ "inputDataExample": "{\"options\": {\"org\": \"my-org-uuid\", \"code\": true, \"path\": \"./my-java-app\"}}",
+ "outputDataExample": "{\"sastEnabled\": true, \"localCodeEngine\": {\"enabled\": false, \"url\": \"\", \"allowCloudUpload\": true}, \"org\": \"my-org-name\"}"
+ },
+ {
+ "simStepId": "7b420e67-b6ce-47b5-8b6f-038e61ed41e0",
+ "diagramNodeId": "2bbd35f8-485b-4ceb-aefe-1772e697769f",
+ "simStepLabel": "SAST: API Request for SAST Settings",
+ "simStepDescription": "An HTTP GET request is made to the Snyk API endpoint `/cli-config/settings/sast` to retrieve the organization's settings for Snyk Code.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/checks.ts",
+ "startLine": "7",
+ "endLine": "18",
+ "relevantVariables": [
+ "getSastSettingsForOrg",
+ "makeRequest",
+ "getAuthHeader"
+ ]
+ },
+ "inputDataExample": "{\"method\": \"GET\", \"url\": \"https://api.snyk.io/cli-config/settings/sast\", \"headers\": {\"Authorization\": \"token 123-abc-456-def\"}, \"qs\": {\"org\": \"my-org-uuid\"}}",
+ "outputDataExample": "{\"method\": \"GET\", \"url\": \"https://api.snyk.io/cli-config/settings/sast\", \"headers\": {\"Authorization\": \"token 123-abc-456-def\"}, \"qs\": {\"org\": \"my-org-uuid\"}}"
+ },
+ {
+ "simStepId": "1cc334ad-bea1-456c-bbba-909a81ae0d19",
+ "diagramNodeId": "8c73f142-d7e2-4413-a7e0-8eaa979d3af2",
+ "simStepLabel": "SAST: Process SAST Settings Response",
+ "simStepDescription": "The API response is processed. The system verifies that Snyk Code is enabled (`sastEnabled: true`). If it's disabled or an auth error occurs, the process terminates with an error. Otherwise, it proceeds with the scan.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/settings.ts",
+ "startLine": "22",
+ "endLine": "41",
+ "relevantVariables": [
+ "sastSettingsResponse",
+ "FeatureNotSupportedForOrgError",
+ "AuthFailedError"
+ ]
+ },
+ "inputDataExample": "{\"sastEnabled\": true, \"localCodeEngine\": {\"enabled\": false}, \"org\": \"my-org-name\"}",
+ "outputDataExample": "{\"sastEnabled\": true, \"localCodeEngine\": {\"enabled\": false, \"url\": \"\", \"allowCloudUpload\": true}, \"org\": \"my-org-name\"}"
+ },
+ {
+ "simStepId": "e8e623c6-5a0c-4866-96c6-b47b3809f178",
+ "diagramNodeId": "a35395a4-8e8f-4da5-8359-e81bae502f3f",
+ "simStepLabel": "SAST: Pass Settings to Analysis Logic",
+ "simStepDescription": "The validated `SastSettings` object, confirming the feature is enabled, is passed to the core analysis function `getCodeTestResults`.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/index.ts",
+ "startLine": "39",
+ "endLine": "45",
+ "relevantVariables": [
+ "getCodeTestResults",
+ "sastSettings"
+ ]
+ },
+ "inputDataExample": "{\"path\": \"./my-java-app\", \"options\": {\"code\": true}, \"sastSettings\": {\"sastEnabled\": true, \"localCodeEngine\": {\"enabled\": false}, \"org\": \"my-org-name\"}, \"requestId\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\"}",
+ "outputDataExample": "{\"path\": \"./my-java-app\", \"options\": {\"code\": true}, \"sastSettings\": {\"sastEnabled\": true, \"localCodeEngine\": {\"enabled\": false}, \"org\": \"my-org-name\"}, \"requestId\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\"}"
+ },
+ {
+ "simStepId": "dfab11fd-cca1-4915-9d98-c2d75f2de052",
+ "diagramNodeId": "04fe7483-0b7f-4d85-8c8c-d9a366db2cbf",
+ "simStepLabel": "SAST: Initiate Code Analysis",
+ "simStepDescription": "The `getCodeTestResults` function begins the analysis process. It determines the Snyk Code engine URL (cloud or local) and prepares the parameters for the code client, which will bundle the local source files.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/analysis.ts",
+ "startLine": "58",
+ "endLine": "74",
+ "relevantVariables": [
+ "getCodeTestResults",
+ "isLocalCodeEngine",
+ "getCodeClientProxyUrl"
+ ]
+ },
+ "inputDataExample": "{\"root\": \"./my-java-app\", \"sastSettings\": {\"sastEnabled\": true, \"localCodeEngine\": {\"enabled\": false}, \"org\": \"my-org-name\"}}",
+ "outputDataExample": "{\"baseURL\": \"https://deeproxy.snyk.io\", \"analysisArgs\": {\"connection\": {}, \"analysisOptions\": {}, \"paths\": [\"./my-java-app\"]}}"
+ },
+ {
+ "simStepId": "b0f4807f-8f39-44a3-9c8b-993baf55461b",
+ "diagramNodeId": "a1226a0a-2e74-4cf3-985a-fdfa0d24ed97",
+ "simStepLabel": "SAST: Send Code Bundle for Analysis",
+ "simStepDescription": "The code client bundles the relevant source files from the target directory and sends them via an API request to the Snyk Code engine for a deep semantic analysis.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/analysis.ts",
+ "startLine": "101",
+ "endLine": "117",
+ "relevantVariables": [
+ "getCodeAnalysis",
+ "analysisArgs",
+ "analyzeFolders"
+ ]
+ },
+ "inputDataExample": "{\"analysisArgs\": {\"connection\": {\"baseURL\": \"https://deeproxy.snyk.io\", \"sessionToken\": \"...\", \"source\": \"snyk-cli\"}, \"analysisOptions\": {\"severity\": 1}, \"paths\": [\"./my-java-app\"]}}",
+ "outputDataExample": "{\"analysisArgs\": {\"connection\": {\"baseURL\": \"https://deeproxy.snyk.io\", \"sessionToken\": \"...\", \"source\": \"snyk-cli\"}, \"analysisOptions\": {\"severity\": 1}, \"paths\": [\"./my-java-app\"]}}"
+ },
+ {
+ "simStepId": "1b157776-e26a-436c-b8be-beac0236b64e",
+ "diagramNodeId": "cb76c7a9-4204-4740-97ca-ecc0c0a0a792",
+ "simStepLabel": "SAST: Receive Analysis Results",
+ "simStepDescription": "The CLI receives the analysis results from the Snyk Code engine in SARIF format, which includes vulnerability details, locations, and data flow information.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/analysis.ts",
+ "startLine": "119",
+ "endLine": "134",
+ "relevantVariables": [
+ "codeAnalysis",
+ "files",
+ "sarif"
+ ]
+ },
+ "inputDataExample": "{\"analysisResults\": {\"sarif\": {\"version\": \"2.1.0\", \"runs\": [{\"tool\": {}, \"results\": [{\"ruleId\": \"java/SQLInjection\", \"message\": {\"text\": \"...\"}}]}]}}, \"analysisURL\": \"https://app.snyk.io/org/my-org/project/my-project/overview?branch=master\", \"timing\": {\"queue\": 500, \"analysis\": 15000}}",
+ "outputDataExample": "{\"analysisResults\": {\"sarif\": {\"version\": \"2.1.0\", \"runs\": [{\"tool\": {}, \"results\": [{\"ruleId\": \"java/SQLInjection\", \"message\": {\"text\": \"...\"}}]}]}}, \"analysisURL\": \"https://app.snyk.io/org/my-org/project/my-project/overview?branch=master\", \"timing\": {\"queue\": 500, \"analysis\": 15000}}"
+ },
+ {
+ "simStepId": "c1fac049-da64-4866-a03a-6e9146b341a2",
+ "diagramNodeId": "951b1618-6ff4-4130-9f0f-e269ca8e4157",
+ "simStepLabel": "SAST: Pass Results for Formatting",
+ "simStepDescription": "The complete `CodeTestResults` object, containing the SARIF payload and metadata, is returned to the main SAST plugin to be formatted for display.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/index.ts",
+ "startLine": "39",
+ "endLine": "45",
+ "relevantVariables": [
+ "testResults",
+ "getCodeTestResults"
+ ]
+ },
+ "inputDataExample": "{\"analysisResults\": {\"sarif\": {\"version\": \"2.1.0\", \"runs\": [{\"tool\": {}, \"results\": [{\"ruleId\": \"java/SQLInjection\", \"message\": {\"text\": \"...\"}}]}]}}, \"analysisURL\": \"https://app.snyk.io/org/my-org/project/my-project/overview?branch=master\", \"timing\": {\"queue\": 500, \"analysis\": 15000}}",
+ "outputDataExample": "{\"analysisResults\": {\"sarif\": {\"version\": \"2.1.0\", \"runs\": [{\"tool\": {}, \"results\": [{\"ruleId\": \"java/SQLInjection\", \"message\": {\"text\": \"...\"}}]}]}}, \"analysisURL\": \"https://app.snyk.io/org/my-org/project/my-project/overview?branch=master\", \"timing\": {\"queue\": 500, \"analysis\": 15000}}"
+ },
+ {
+ "simStepId": "f74a6059-bcdc-4780-ab4c-769a3d998f2b",
+ "diagramNodeId": "18f7762c-2b2c-4bab-94a2-54e30c2e4e76",
+ "simStepLabel": "SAST: Format Results for Display",
+ "simStepDescription": "The SARIF results are parsed and formatted into a human-readable summary for the terminal. It identifies the number of issues, their severities, and locations in the code. This step also handles different output formats like `--json` or `--sarif`.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/index.ts",
+ "startLine": "61",
+ "endLine": "73",
+ "relevantVariables": [
+ "getCodeDisplayedOutput",
+ "sarifRunResults",
+ "foundIssues",
+ "numOfIssues",
+ "getMeta"
+ ]
+ },
+ "inputDataExample": "{\"analysisResults\": {\"sarif\": {\"version\": \"2.1.0\", \"runs\": [{\"tool\": {}, \"results\": [{\"ruleId\": \"java/SQLInjection\", \"message\": {\"text\": \"...\"}}]}]}}, \"options\": {\"json\": false}}",
+ "outputDataExample": "{\"readableResult\": \"✗ [High] SQL Injection in SqlInjectionLesson5a.java, line 82\\n...\\nTest Summary: 1 issues found\", \"jsonResult\": null}"
+ },
+ {
+ "simStepId": "7f6f5f4d-1184-4f08-9170-a4817702fdc3",
+ "diagramNodeId": "",
+ "simStepLabel": "SAST: Output to Terminal",
+ "simStepDescription": "The final formatted string, containing the summary of vulnerabilities, is returned by the plugin and printed to the standard output for the user to see.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/plugins/sast/index.ts",
+ "startLine": "79",
+ "endLine": "83",
+ "relevantVariables": [
+ "TestResult",
+ "readableResult",
+ "jsonResult"
+ ]
+ },
+ "inputDataExample": "{\"readableResult\": \"✗ [High] SQL Injection in SqlInjectionLesson5a.java, line 82\\n...\\nTest Summary: 1 issues found\"}",
+ "outputDataExample": "{\"readableResult\": \"✗ [High] SQL Injection in SqlInjectionLesson5a.java, line 82\\n...\\nTest Summary: 1 issues found\"}"
+ }
+ ],
+ "description": "- This is Snyk's Static Application Security Testing (SAST) functionality, allowing developers to find and fix issues in their own code
- - A user runs
snyk code test against a directory of source code - - The CLI bundles the relevant source files and sends them to the Snyk Code engine for a deep semantic analysis
- - The results, including the exact location of the vulnerability in the code and data flow information, are displayed in the terminal
- - This helps developers fix security flaws before they reach production
",
+ "simulationNodesAndEdges": {
+ "85df9d5a-33e1-413b-ac31-8e6eda9f5517": {
+ "simStepIds": [
+ "c8c7ee4e-8f17-4c1b-b813-d7f6d360e219"
+ ]
+ },
+ "87fdb414-03a7-4944-9350-b2227ddf3890": {
+ "simStepIds": [
+ "c6491e83-01e8-4cbe-b2b6-b7e276d682b0"
+ ]
+ },
+ "8c73f142-d7e2-4413-a7e0-8eaa979d3af2": {
+ "simStepIds": [
+ "1cc334ad-bea1-456c-bbba-909a81ae0d19"
+ ]
+ },
+ "04fe7483-0b7f-4d85-8c8c-d9a366db2cbf": {
+ "simStepIds": [
+ "dfab11fd-cca1-4915-9d98-c2d75f2de052"
+ ]
+ },
+ "cb76c7a9-4204-4740-97ca-ecc0c0a0a792": {
+ "simStepIds": [
+ "1b157776-e26a-436c-b8be-beac0236b64e"
+ ]
+ },
+ "18f7762c-2b2c-4bab-94a2-54e30c2e4e76": {
+ "simStepIds": [
+ "f74a6059-bcdc-4780-ab4c-769a3d998f2b"
+ ]
+ },
+ "177732a8-44c1-43c8-9aea-0ad57b01bcb4": {
+ "simStepIds": [
+ "63237123-ae0f-470f-96d6-3b052b9cd0f6"
+ ]
+ },
+ "2bbd35f8-485b-4ceb-aefe-1772e697769f": {
+ "simStepIds": [
+ "7b420e67-b6ce-47b5-8b6f-038e61ed41e0"
+ ]
+ },
+ "a35395a4-8e8f-4da5-8359-e81bae502f3f": {
+ "simStepIds": [
+ "e8e623c6-5a0c-4866-96c6-b47b3809f178"
+ ]
+ },
+ "a1226a0a-2e74-4cf3-985a-fdfa0d24ed97": {
+ "simStepIds": [
+ "b0f4807f-8f39-44a3-9c8b-993baf55461b"
+ ]
+ },
+ "951b1618-6ff4-4130-9f0f-e269ca8e4157": {
+ "simStepIds": [
+ "c1fac049-da64-4866-a03a-6e9146b341a2"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "code test, sast, getCodeTestResults",
+ "generationPrompt": "Scan application source code for security vulnerabilities (SAST)",
+ "generationKeywords": "code test, sast, getCodeTestResults"
+ },
+ "Continuously monitor projects for new vulnerabilities": {
+ "name": "Continuously monitor projects for new vulnerabilities",
+ "simSteps": [
+ {
+ "simStepId": "8e548081-e285-47ef-85d6-4c08853749af",
+ "diagramNodeId": "8fe34504-b3ce-431c-9ced-38245c77cfc3",
+ "simStepLabel": "Command Invocation and Argument Parsing",
+ "simStepDescription": "The user runs the `snyk monitor` command from their terminal. The Snyk CLI parses the command, arguments, and flags (e.g., `--project-name`, `--org`) to create an options configuration object for the monitoring task.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/commands/monitor/index.ts",
+ "startLine": "36",
+ "endLine": "234",
+ "relevantVariables": [
+ "args",
+ "processCommandArgs",
+ "options"
+ ]
+ },
+ "inputDataExample": "{\"command\": \"snyk monitor . --project-name=my-app --org=my-org-slug\"}",
+ "outputDataExample": "{\"path\": \".\", \"projectName\": \"my-app\", \"org\": \"my-org-slug\"}"
+ },
+ {
+ "simStepId": "4d2ddc8d-56e1-4eea-b450-1e68aae83020",
+ "diagramNodeId": "807988de-deab-4338-8094-1db81b930e69",
+ "simStepLabel": "Configuration Transfer",
+ "simStepDescription": "The parsed options configuration is passed to the core monitoring logic to determine the appropriate scanning strategy.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/commands/monitor/index.ts",
+ "startLine": "169",
+ "endLine": "169",
+ "relevantVariables": [
+ "options"
+ ]
+ },
+ "inputDataExample": "{\"path\": \".\", \"projectName\": \"my-app\", \"org\": \"my-org-slug\"}",
+ "outputDataExample": "{\"path\": \".\", \"projectName\": \"my-app\", \"org\": \"my-org-slug\"}"
+ },
+ {
+ "simStepId": "b5623c1f-924f-4354-8f6c-df35c322664a",
+ "diagramNodeId": "d82ce01e-7a3d-4a59-92af-163333afbe4d",
+ "simStepLabel": "Ecosystem Detection and Strategy Selection",
+ "simStepDescription": "The CLI determines the project's ecosystem (e.g., npm, maven, docker) based on the files present and the command-line options. It then selects the modern 'ecosystem' monitoring strategy if applicable.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/commands/monitor/index.ts",
+ "startLine": "169",
+ "endLine": "177",
+ "relevantVariables": [
+ "getEcosystem",
+ "ecosystem",
+ "monitorEcosystem"
+ ]
+ },
+ "inputDataExample": "{\"path\": \".\", \"projectName\": \"my-app\", \"org\": \"my-org-slug\"}",
+ "outputDataExample": "{\"ecosystem\": \"npm\"}"
+ },
+ {
+ "simStepId": "c1b18c29-d707-44ea-ad10-0fe16ce8be25",
+ "diagramNodeId": "d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e",
+ "simStepLabel": "Dispatch to Ecosystem Monitor",
+ "simStepDescription": "The execution is dispatched to the `monitorEcosystem` function, passing along the project paths and configuration options for scanning.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/commands/monitor/index.ts",
+ "startLine": "171",
+ "endLine": "176",
+ "relevantVariables": [
+ "monitorEcosystem"
+ ]
+ },
+ "inputDataExample": "{\"ecosystem\": \"npm\", \"paths\": [\"/path/to/project\"], \"options\": {\"projectName\": \"my-app\", \"org\": \"my-org-slug\"}}",
+ "outputDataExample": "{\"ecosystem\": \"npm\", \"paths\": [\"/path/to/project\"], \"options\": {\"projectName\": \"my-app\", \"org\": \"my-org-slug\"}}"
+ },
+ {
+ "simStepId": "af23c831-dab9-4d0a-8c29-b9d8a4015949",
+ "diagramNodeId": "9b0f24f6-1620-4ac6-9d9e-855fef646f5d",
+ "simStepLabel": "Project Dependency Scanning",
+ "simStepDescription": "The `monitorEcosystem` function uses a plugin specific to the detected ecosystem (e.g., 'npm') to scan the project. The plugin reads manifest files (like package.json and package-lock.json), resolves all dependencies, and builds a complete dependency graph.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/ecosystems/monitor.ts",
+ "startLine": "46",
+ "endLine": "56",
+ "relevantVariables": [
+ "getPlugin",
+ "plugin.scan"
+ ]
+ },
+ "inputDataExample": "{\"ecosystem\": \"npm\", \"options\": {\"path\": \"/path/to/project\"}}",
+ "outputDataExample": "[{\"identity\": {\"type\": \"npm\", \"targetFile\": \"package.json\"}, \"facts\": [{\"type\": \"depGraph\", \"data\": {\"schemaVersion\": \"1.2.0\", \"pkgManager\": {\"name\": \"npm\"}, \"pkgs\": [{\"id\": \"my-app@1.0.0\", \"info\": {\"name\": \"my-app\", \"version\": \"1.0.0\"}}, {\"id\": \"express@4.17.1\", \"info\": {\"name\": \"express\", \"version\": \"4.17.1\"}}], \"graph\": {\"rootNodeId\": \"root-node\", \"nodes\": [{\"nodeId\": \"root-node\", \"pkgId\": \"my-app@1.0.0\", \"deps\": [{\"nodeId\": \"express@4.17.1\"}]}, {\"nodeId\": \"express@4.17.1\", \"pkgId\": \"express@4.17.1\", \"deps\": []}]}}}], \"name\": \"my-app\"}]"
+ },
+ {
+ "simStepId": "6f80a0a6-5228-42ae-b48d-6c0b71e42af9",
+ "diagramNodeId": "a1d58d6c-4fa1-430e-aca9-8f02d067abad",
+ "simStepLabel": "Transmit Scan Results for API Payload Creation",
+ "simStepDescription": "The generated scan results, including the dependency graph, are passed internally to the next function responsible for constructing the API request payload.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/ecosystems/monitor.ts",
+ "startLine": "84",
+ "endLine": "89",
+ "relevantVariables": [
+ "scanResultsByPath",
+ "selectAndExecuteMonitorStrategy"
+ ]
+ },
+ "inputDataExample": "[{\"identity\": {\"type\": \"npm\", \"targetFile\": \"package.json\"}, \"facts\": [{\"type\": \"depGraph\", \"data\": {\"schemaVersion\": \"1.2.0\", \"pkgManager\": {\"name\": \"npm\"}, \"pkgs\": [{\"id\": \"my-app@1.0.0\", \"info\": {\"name\": \"my-app\", \"version\": \"1.0.0\"}}, {\"id\": \"express@4.17.1\", \"info\": {\"name\": \"express\", \"version\": \"4.17.1\"}}], \"graph\": {\"rootNodeId\": \"root-node\", \"nodes\": [{\"nodeId\": \"root-node\", \"pkgId\": \"my-app@1.0.0\", \"deps\": [{\"nodeId\": \"express@4.17.1\"}]}, {\"nodeId\": \"express@4.17.1\", \"pkgId\": \"express@4.17.1\", \"deps\": []}]}}}], \"name\": \"my-app\"}]",
+ "outputDataExample": "[{\"identity\": {\"type\": \"npm\", \"targetFile\": \"package.json\"}, \"facts\": [{\"type\": \"depGraph\", \"data\": {\"schemaVersion\": \"1.2.0\", \"pkgManager\": {\"name\": \"npm\"}, \"pkgs\": [{\"id\": \"my-app@1.0.0\", \"info\": {\"name\": \"my-app\", \"version\": \"1.0.0\"}}, {\"id\": \"express@4.17.1\", \"info\": {\"name\": \"express\", \"version\": \"4.17.1\"}}], \"graph\": {\"rootNodeId\": \"root-node\", \"nodes\": [{\"nodeId\": \"root-node\", \"pkgId\": \"my-app@1.0.0\", \"deps\": [{\"nodeId\": \"express@4.17.1\"}]}, {\"nodeId\": \"express@4.17.1\", \"pkgId\": \"express@4.17.1\", \"deps\": []}]}}}], \"name\": \"my-app\"}]"
+ },
+ {
+ "simStepId": "eaff140f-6c07-403b-bc5c-d97849b3cafe",
+ "diagramNodeId": "c199f3ac-935a-40f2-8343-2fe978313083",
+ "simStepLabel": "Send Project Snapshot to Snyk API",
+ "simStepDescription": "A JSON payload, representing the project's snapshot (including the dependency graph, metadata, and any applicable policies), is created. This payload is then sent to the Snyk API's `/monitor-dependencies` endpoint via an authenticated PUT request.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/monitor/index.ts",
+ "startLine": "39",
+ "endLine": "82",
+ "relevantVariables": [
+ "monitor",
+ "request",
+ "snyk.api"
+ ]
+ },
+ "inputDataExample": "[{\"identity\": {\"type\": \"npm\", \"targetFile\": \"package.json\"}, \"facts\": [{\"type\": \"depGraph\", \"data\": {}}], \"name\": \"my-app\"}]",
+ "outputDataExample": "{\"body\": {\"scanResult\": {\"identity\": {\"type\": \"npm\"}, \"facts\": [{\"type\": \"depGraph\", \"data\": {}}], \"name\": \"my-app\"}}, \"method\": \"PUT\", \"url\": \"https://api.snyk.io/v1/monitor-dependencies\"}"
+ },
+ {
+ "simStepId": "e1d5c936-b095-45da-b257-fd1f5e52af44",
+ "diagramNodeId": "64d2e920-3c82-4a3d-ba11-d479500941f5",
+ "simStepLabel": "Receive API Confirmation",
+ "simStepDescription": "The Snyk API processes the snapshot, saves it to the user's account, and returns a confirmation response. This response includes the newly created project ID and a URL to view the project on the Snyk website.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/request/promise.ts",
+ "startLine": "13",
+ "endLine": "28",
+ "relevantVariables": [
+ "makeRequest"
+ ]
+ },
+ "inputDataExample": "{\"statusCode\": 201, \"body\": {\"id\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\", \"isMonitored\": true, \"uri\": \"https://app.snyk.io/org/my-org-slug/project/a1b2c3d4-e5f6-7890-1234-567890abcdef\", \"projectName\": \"my-app\"}}",
+ "outputDataExample": "{\"statusCode\": 201, \"body\": {\"id\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\", \"isMonitored\": true, \"uri\": \"https://app.snyk.io/org/my-org-slug/project/a1b2c3d4-e5f6-7890-1234-567890abcdef\", \"projectName\": \"my-app\"}}"
+ },
+ {
+ "simStepId": "6062ce68-9179-4264-91df-59ba447d3e89",
+ "diagramNodeId": "a61594f2-05b5-45b3-b9d9-6a0ea230d609",
+ "simStepLabel": "Display Monitoring Confirmation",
+ "simStepDescription": "The CLI processes the successful API response and formats a confirmation message for the user. This message includes the link to the monitored project and confirms that Snyk will now continuously monitor the snapshot for new vulnerabilities.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/formatters/format-monitor-response.ts",
+ "startLine": "71",
+ "endLine": "103",
+ "relevantVariables": [
+ "formatMonitorOutput",
+ "res.uri"
+ ]
+ },
+ "inputDataExample": "[{\"id\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\", \"isMonitored\": true, \"uri\": \"https://app.snyk.io/org/my-org-slug/project/a1b2c3d4-e5f6-7890-1234-567890abcdef\", \"path\": \"/path/to/project\", \"projectName\": \"my-app\"}]",
+ "outputDataExample": "{\"stdout\": \"Monitoring /path/to/project (my-app)...\\n\\nExplore this snapshot at https://app.snyk.io/org/my-org-slug/project/a1b2c3d4-e5f6-7890-1234-567890abcdef\\n\\nNotifications about newly disclosed issues related to these dependencies will be emailed to you.\"}"
+ }
+ ],
+ "description": "- This use case moves from a point-in-time scan to a continuous monitoring process, which is a key value proposition for maintaining security over time
- - A user runs
snyk monitor to take a snapshot of the project's current dependencies (for open source) or image contents (for containers) - - This snapshot is stored in the Snyk platform, associated with the user's project
- - Snyk continuously monitors this snapshot against its vulnerability database and alerts the user (e
- g
- , via email or Slack) when new vulnerabilities are discovered that affect their project
- - This allows teams to react quickly to newly disclosed threats without needing to constantly re-scan
",
+ "simulationNodesAndEdges": {
+ "8fe34504-b3ce-431c-9ced-38245c77cfc3": {
+ "simStepIds": [
+ "8e548081-e285-47ef-85d6-4c08853749af"
+ ]
+ },
+ "d82ce01e-7a3d-4a59-92af-163333afbe4d": {
+ "simStepIds": [
+ "b5623c1f-924f-4354-8f6c-df35c322664a"
+ ]
+ },
+ "9b0f24f6-1620-4ac6-9d9e-855fef646f5d": {
+ "simStepIds": [
+ "af23c831-dab9-4d0a-8c29-b9d8a4015949"
+ ]
+ },
+ "c199f3ac-935a-40f2-8343-2fe978313083": {
+ "simStepIds": [
+ "eaff140f-6c07-403b-bc5c-d97849b3cafe"
+ ]
+ },
+ "a61594f2-05b5-45b3-b9d9-6a0ea230d609": {
+ "simStepIds": [
+ "6062ce68-9179-4264-91df-59ba447d3e89"
+ ]
+ },
+ "807988de-deab-4338-8094-1db81b930e69": {
+ "simStepIds": [
+ "4d2ddc8d-56e1-4eea-b450-1e68aae83020"
+ ]
+ },
+ "d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e": {
+ "simStepIds": [
+ "c1b18c29-d707-44ea-ad10-0fe16ce8be25"
+ ]
+ },
+ "a1d58d6c-4fa1-430e-aca9-8f02d067abad": {
+ "simStepIds": [
+ "6f80a0a6-5228-42ae-b48d-6c0b71e42af9"
+ ]
+ },
+ "64d2e920-3c82-4a3d-ba11-d479500941f5": {
+ "simStepIds": [
+ "e1d5c936-b095-45da-b257-fd1f5e52af44"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "snyk monitor, snykMonitor, monitorEcosystem",
+ "generationPrompt": "Continuously monitor projects for new vulnerabilities",
+ "generationKeywords": "snyk monitor, snykMonitor, monitorEcosystem"
+ },
+ "Automatically fix open-source vulnerabilities": {
+ "name": "Automatically fix open-source vulnerabilities",
+ "simSteps": [
+ {
+ "simStepId": "574dabd8-20ff-4005-bc6e-2b5c32e69c51",
+ "diagramNodeId": "49e8d2e5-66a9-4da4-8dd6-29c384c4e617",
+ "simStepLabel": "Command Validation: Check Feature Support",
+ "simStepDescription": "The user runs `snyk fix`. The CLI first validates if the `snyk fix` feature is enabled for the user's organization by checking the `cliSnykFix` feature flag. This step ensures that the command can proceed before performing any intensive operations like scanning.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts",
+ "startLine": "13",
+ "endLine": "27",
+ "relevantVariables": [
+ "validateFixCommandIsSupported",
+ "options",
+ "getEcosystemForTest",
+ "isFeatureFlagSupportedForOrg",
+ "snykFixFeatureFlag"
+ ]
+ },
+ "inputDataExample": "{\"path\": \"/path/to/project\", \"org\": \"my-org\", \"dryRun\": false, \"sequentialFix\": true}",
+ "outputDataExample": "{\"ok\": true}"
+ },
+ {
+ "simStepId": "ec0fd951-34ae-4ac7-a3d0-f110f3fc869a",
+ "diagramNodeId": "5f83b817-b895-4237-8c3c-64703a0aaa0b",
+ "simStepLabel": "Validation Success",
+ "simStepDescription": "The boolean result indicating that `snyk fix` is supported is passed back to the main command handler, allowing the process to continue.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts",
+ "startLine": "45",
+ "endLine": "53",
+ "relevantVariables": [
+ "results",
+ "runSnykTestLegacy"
+ ]
+ },
+ "inputDataExample": "{\"supported\": true}",
+ "outputDataExample": "{\"supported\": true}"
+ },
+ {
+ "simStepId": "73da6b68-0a68-4c57-8933-f8fa56819537",
+ "diagramNodeId": "faaedbc4-41ce-4a24-a3c3-f1ba22372a33",
+ "simStepLabel": "Vulnerability Scanning",
+ "simStepDescription": "The CLI executes a vulnerability scan, similar to `snyk test`, on the specified paths to identify vulnerabilities and their potential remediations. The results are collected into a list of entities that need to be fixed.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts",
+ "startLine": "46",
+ "endLine": "46",
+ "relevantVariables": [
+ "runSnykTestLegacy",
+ "options",
+ "paths"
+ ]
+ },
+ "inputDataExample": "{\"options\": {\"path\": \"/path/to/project\", \"org\": \"my-org\", \"json\": true}, \"paths\": [\"/path/to/project\"]}",
+ "outputDataExample": "[{\"path\": \"/path/to/project\", \"testResult\": {\"issues\": [{\"id\": \"SNYK-PYTHON-DJANGO-12345\", \"packageName\": \"django\", \"version\": \"1.8\", \"remediation\": {\"upgrade\": {\"upgradeTo\": \"django@2.2.28\"}}}], \"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}}}]"
+ },
+ {
+ "simStepId": "00d221b5-1fbe-48d5-bb0b-dac917d76b76",
+ "diagramNodeId": "b235583a-957b-41e0-b5e8-4e4ff4c02198",
+ "simStepLabel": "Pass Vulnerable Entities to Fix Engine",
+ "simStepDescription": "The scan results containing vulnerable dependencies are passed to the core `@snyk/fix` package for processing and remediation.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts",
+ "startLine": "57",
+ "endLine": "62",
+ "relevantVariables": [
+ "snykFix.fix",
+ "vulnerableResults",
+ "options"
+ ]
+ },
+ "inputDataExample": "[{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}]",
+ "outputDataExample": "[{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}]"
+ },
+ {
+ "simStepId": "e3655bbf-11b4-4582-8454-2ee3da1bfda1",
+ "diagramNodeId": "018b111a-f6be-49f3-99e0-83ed5baf6097",
+ "simStepLabel": "Partition and Group Entities",
+ "simStepDescription": "Inside the `@snyk/fix` package, the list of vulnerable items is first partitioned to separate fixable from non-fixable items. Then, the fixable items are grouped by their ecosystem or scan type (e.g., 'pip', 'npm') to be processed by the appropriate plugin.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts",
+ "startLine": "43",
+ "endLine": "45",
+ "relevantVariables": [
+ "partitionByVulnerable",
+ "groupEntitiesPerScanType",
+ "entities",
+ "vulnerable"
+ ]
+ },
+ "inputDataExample": "[{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}]",
+ "outputDataExample": "{\"pip\": [{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}]}"
+ },
+ {
+ "simStepId": "e2a7e0a1-9d99-4f16-ae1e-38050efcc40f",
+ "diagramNodeId": "92c113ad-5fc9-40c8-a1a5-9ee559639783",
+ "simStepLabel": "Route Entities to Plugins",
+ "simStepDescription": "The grouped entities are now ready to be processed. The code iterates through each ecosystem group and passes the corresponding entities to a plugin loader.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts",
+ "startLine": "51",
+ "endLine": "51",
+ "relevantVariables": [
+ "pMap",
+ "Object.keys(entitiesPerType)"
+ ]
+ },
+ "inputDataExample": "{\"pip\": [{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}]}",
+ "outputDataExample": "{\"pip\": [{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}]}"
+ },
+ {
+ "simStepId": "56eb6e35-443f-4a6c-8652-3440950fda43",
+ "diagramNodeId": "bc55c7f8-629c-4721-9afc-2c3f61ae5528",
+ "simStepLabel": "Load Ecosystem-Specific Plugin",
+ "simStepDescription": "For each ecosystem (e.g., 'pip'), a specific plugin is loaded. This plugin contains the logic for handling that ecosystem's package managers and manifest files.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts",
+ "startLine": "5",
+ "endLine": "9",
+ "relevantVariables": [
+ "loadPlugin",
+ "type",
+ "pythonFix"
+ ]
+ },
+ "inputDataExample": "\"pip\"",
+ "outputDataExample": "{\"functionRef\": \"pythonFix\"}"
+ },
+ {
+ "simStepId": "1a7306ec-1588-4a84-8317-aa2c1fef3358",
+ "diagramNodeId": "9f186d49-1651-4bc8-bf03-e52f6f5f0308",
+ "simStepLabel": "Invoke Python Plugin",
+ "simStepDescription": "The loaded Python plugin is invoked with all the vulnerable entities belonging to the 'pip' ecosystem.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/index.ts",
+ "startLine": "16",
+ "endLine": "29",
+ "relevantVariables": [
+ "pythonFix",
+ "entities",
+ "options"
+ ]
+ },
+ "inputDataExample": "{\"entities\": [{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}], \"options\": {\"dryRun\": false}}",
+ "outputDataExample": "{\"entities\": [{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}], \"options\": {\"dryRun\": false}}"
+ },
+ {
+ "simStepId": "2f0287d8-5b84-4ea8-8592-a8bcac01e1d7",
+ "diagramNodeId": "5025a11b-ad74-43be-8412-41019cd2b517",
+ "simStepLabel": "Apply Fixes via Manifest Handler",
+ "simStepDescription": "The Python plugin delegates the fixing logic to a specific handler based on the manifest file type, such as `pipRequirementsTxt` for `requirements.txt`. This handler reads the manifest, calculates the dependency upgrades or pins, and applies them. If not a dry run, it writes the changes back to the file.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts",
+ "startLine": "32",
+ "endLine": "59",
+ "relevantVariables": [
+ "pipRequirementsTxt",
+ "fixable",
+ "sortByDirectory",
+ "fixAll"
+ ]
+ },
+ "inputDataExample": "{\"fixable\": [{\"workspace\": {\"path\": \".\"}, \"scanResult\": {\"identity\": {\"type\": \"pip\", \"targetFile\": \"requirements.txt\"}, \"remediation\": {\"pin\": {\"django@1.8\": {\"upgradeTo\": \"django@2.2.28\"}}}}}], \"options\": {\"dryRun\": false}}",
+ "outputDataExample": "{\"succeeded\": [{\"original\": {\"scanResult\": {\"identity\": {\"targetFile\": \"requirements.txt\"}}}, \"changes\": [{\"from\": \"Django@1.8\", \"to\": \"Django@2.2.28\", \"success\": true}]}], \"failed\": [], \"skipped\": []}"
+ },
+ {
+ "simStepId": "9d10714d-6924-4353-a0d2-c89e006821b9",
+ "diagramNodeId": "28407214-e4ff-4556-96be-b831fdcba4dd",
+ "simStepLabel": "Return Fix Results",
+ "simStepDescription": "The results from the handler, including successful, failed, and skipped fixes, are returned and aggregated by the main fix engine.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts",
+ "startLine": "59",
+ "endLine": "59",
+ "relevantVariables": [
+ "resultsByPlugin"
+ ]
+ },
+ "inputDataExample": "{\"python\": {\"succeeded\": [{\"original\": {\"scanResult\": {\"identity\": {\"targetFile\": \"requirements.txt\"}}}, \"changes\": [{\"from\": \"Django@1.8\", \"to\": \"Django@2.2.28\", \"success\": true}]}], \"failed\": [], \"skipped\": []}}",
+ "outputDataExample": "{\"python\": {\"succeeded\": [{\"original\": {\"scanResult\": {\"identity\": {\"targetFile\": \"requirements.txt\"}}}, \"changes\": [{\"from\": \"Django@1.8\", \"to\": \"Django@2.2.28\", \"success\": true}]}], \"failed\": [], \"skipped\": []}}"
+ },
+ {
+ "simStepId": "d93d1e26-1f42-4436-b8bd-871ef289ebaa",
+ "diagramNodeId": "b09b8c9b-af43-4757-9b7f-c479c2d39cbd",
+ "simStepLabel": "Generate Overall Summary",
+ "simStepDescription": "After all plugins have run, the aggregated results are passed to an output formatter. This formatter calculates statistics like the number of fixed projects, failed attempts, and total issues addressed.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts",
+ "startLine": "123",
+ "endLine": "129",
+ "relevantVariables": [
+ "generateOverallSummary",
+ "resultsByPlugin",
+ "exceptions",
+ "nothingToFix"
+ ]
+ },
+ "inputDataExample": "{\"resultsByPlugin\": {\"python\": {\"succeeded\": [{\"original\": {\"scanResult\": {\"identity\": {\"targetFile\": \"requirements.txt\"}}}, \"changes\": [{\"from\": \"Django@1.8\", \"to\": \"Django@2.2.28\", \"success\": true}]}], \"failed\": [], \"skipped\": []}}, \"exceptions\": {}, \"nothingToFix\": []}",
+ "outputDataExample": "{\"summary\": \"✓ 1 project fixed\", \"count\": 1}"
+ },
+ {
+ "simStepId": "8c1875f0-728a-49ae-a31b-6d4bc8c94673",
+ "diagramNodeId": "39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077",
+ "simStepLabel": "Return Formatted Summary to CLI",
+ "simStepDescription": "The final formatted summary string and metadata are returned from the `@snyk/fix` package to the main CLI command handler.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts",
+ "startLine": "62",
+ "endLine": "62",
+ "relevantVariables": [
+ "fixResult"
+ ]
+ },
+ "inputDataExample": "{\"fixSummary\": \"\\nSuccessful fixes:\\n\\n✓ Upgraded Django from 1.8 to 2.2.28 in requirements.txt\\n\\n SUMMARY \\n\\n Total projects: 1\\n Fixed projects: 1\\n Total issues: 1\\n Fixable issues: 1\\n Fixed issues: 1\", \"meta\": {\"failed\": 0, \"fixed\": 1, \"totalIssues\": 1, \"fixableIssues\": 1}}",
+ "outputDataExample": "{\"fixSummary\": \"\\nSuccessful fixes:\\n\\n✓ Upgraded Django from 1.8 to 2.2.28 in requirements.txt\\n\\n SUMMARY \\n\\n Total projects: 1\\n Fixed projects: 1\\n Total issues: 1\\n Fixable issues: 1\\n Fixed issues: 1\", \"meta\": {\"failed\": 0, \"fixed\": 1, \"totalIssues\": 1, \"fixableIssues\": 1}}"
+ },
+ {
+ "simStepId": "d86c37d2-95f9-40ce-aa4e-626595032e96",
+ "diagramNodeId": "3082770f-9af1-4edf-b6ce-7c1011a37030",
+ "simStepLabel": "Display Results and Exit",
+ "simStepDescription": "The CLI command receives the final summary string and prints it to the standard output for the user to see. It also sends analytics about the fix operation and exits with an appropriate status code.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts",
+ "startLine": "169",
+ "endLine": "177",
+ "relevantVariables": [
+ "setSnykFixAnalytics",
+ "fixSummary",
+ "meta",
+ "analytics"
+ ]
+ },
+ "inputDataExample": "{\"fixSummary\": \"\\nSuccessful fixes:\\n\\n✓ Upgraded Django from 1.8 to 2.2.28 in requirements.txt\\n\\n SUMMARY \\n\\n Total projects: 1\\n Fixed projects: 1\\n Total issues: 1\\n Fixable issues: 1\\n Fixed issues: 1\", \"meta\": {\"failed\": 0, \"fixed\": 1}}",
+ "outputDataExample": "stdout: \"\\nSuccessful fixes:\\n\\n✓ Upgraded Django from 1.8 to 2.2.28 in requirements.txt\\n\\n SUMMARY \\n\\n Total projects: 1\\n Fixed projects: 1\\n Total issues: 1\\n Fixable issues: 1\\n Fixed issues: 1\""
+ }
+ ],
+ "description": "- This feature provides automated remediation, significantly reducing the time it takes to fix vulnerabilities
- - A user runs
snyk fix in their project directory - - The CLI identifies vulnerabilities that have a simple fix, such as a dependency upgrade or a patch
- - It then automatically applies these changes to the manifest files (e
- g
- ,
package - json,
pom - xml,
requirements - txt)
- - For more complex fixes, it may provide interactive wizards or patch files via
snyk protect
",
+ "simulationNodesAndEdges": {
+ "49e8d2e5-66a9-4da4-8dd6-29c384c4e617": {
+ "simStepIds": [
+ "574dabd8-20ff-4005-bc6e-2b5c32e69c51"
+ ]
+ },
+ "faaedbc4-41ce-4a24-a3c3-f1ba22372a33": {
+ "simStepIds": [
+ "73da6b68-0a68-4c57-8933-f8fa56819537"
+ ]
+ },
+ "018b111a-f6be-49f3-99e0-83ed5baf6097": {
+ "simStepIds": [
+ "e3655bbf-11b4-4582-8454-2ee3da1bfda1"
+ ]
+ },
+ "bc55c7f8-629c-4721-9afc-2c3f61ae5528": {
+ "simStepIds": [
+ "56eb6e35-443f-4a6c-8652-3440950fda43"
+ ]
+ },
+ "5025a11b-ad74-43be-8412-41019cd2b517": {
+ "simStepIds": [
+ "2f0287d8-5b84-4ea8-8592-a8bcac01e1d7"
+ ]
+ },
+ "b09b8c9b-af43-4757-9b7f-c479c2d39cbd": {
+ "simStepIds": [
+ "d93d1e26-1f42-4436-b8bd-871ef289ebaa"
+ ]
+ },
+ "3082770f-9af1-4edf-b6ce-7c1011a37030": {
+ "simStepIds": [
+ "d86c37d2-95f9-40ce-aa4e-626595032e96"
+ ]
+ },
+ "5f83b817-b895-4237-8c3c-64703a0aaa0b": {
+ "simStepIds": [
+ "ec0fd951-34ae-4ac7-a3d0-f110f3fc869a"
+ ]
+ },
+ "b235583a-957b-41e0-b5e8-4e4ff4c02198": {
+ "simStepIds": [
+ "00d221b5-1fbe-48d5-bb0b-dac917d76b76"
+ ]
+ },
+ "92c113ad-5fc9-40c8-a1a5-9ee559639783": {
+ "simStepIds": [
+ "e2a7e0a1-9d99-4f16-ae1e-38050efcc40f"
+ ]
+ },
+ "9f186d49-1651-4bc8-bf03-e52f6f5f0308": {
+ "simStepIds": [
+ "1a7306ec-1588-4a84-8317-aa2c1fef3358"
+ ]
+ },
+ "28407214-e4ff-4556-96be-b831fdcba4dd": {
+ "simStepIds": [
+ "9d10714d-6924-4353-a0d2-c89e006821b9"
+ ]
+ },
+ "39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077": {
+ "simStepIds": [
+ "8c1875f0-728a-49ae-a31b-6d4bc8c94673"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "snyk fix, snyk-fix, FixHandler",
+ "generationPrompt": "Automatically fix open-source vulnerabilities",
+ "generationKeywords": "snyk fix, snyk-fix, FixHandler"
+ },
+ "Scan container images for vulnerabilities": {
+ "name": "Scan container images for vulnerabilities",
+ "simSteps": [
+ {
+ "simStepId": "587a712f-f06c-4356-9789-ecfbe1f45384",
+ "diagramNodeId": "17dee647-c7e6-4342-8c36-e73289cf6d7c",
+ "simStepLabel": "Command Execution",
+ "simStepDescription": "The user executes the `snyk container test ` command. The CLI argument parser identifies `container` as a mode that enables the `--docker` flag and `test` as the command.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/commands/test/index.ts",
+ "startLine": "112",
+ "endLine": "120",
+ "relevantVariables": [
+ "options.docker",
+ "EXCLUDE_APP_VULNS_OPTION",
+ "APP_VULNS_OPTION"
+ ]
+ },
+ "inputDataExample": "{\n \"command\": \"snyk container test ubuntu:latest\"\n}",
+ "outputDataExample": "{\n \"command\": \"test\",\n \"options\": {\n \"docker\": true,\n \"path\": \"ubuntu:latest\",\n \"app-vulns\": true\n }\n}"
+ },
+ {
+ "simStepId": "9a2da392-1a53-4219-b26d-33618d0555fb",
+ "diagramNodeId": "e26a7a82-c3e1-4eb7-8584-a8049de3795e",
+ "simStepLabel": "Options Propagation",
+ "simStepDescription": "The parsed command, paths, and options are passed from the command handler to the core testing library.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/commands/test/index.ts",
+ "startLine": "148",
+ "endLine": "148",
+ "relevantVariables": [
+ "snyk.test"
+ ]
+ },
+ "inputDataExample": "{\n \"command\": \"test\",\n \"paths\": [\"ubuntu:latest\"],\n \"options\": {\n \"docker\": true,\n \"path\": \"ubuntu:latest\",\n \"app-vulns\": true\n }\n}",
+ "outputDataExample": "{\n \"command\": \"test\",\n \"paths\": [\"ubuntu:latest\"],\n \"options\": {\n \"docker\": true,\n \"path\": \"ubuntu:latest\",\n \"app-vulns\": true\n }\n}"
+ },
+ {
+ "simStepId": "7c6a3c19-c15b-4314-bc8e-c95d466b9df8",
+ "diagramNodeId": "950404fa-f4bb-4054-9691-5ad1fa8a51d7",
+ "simStepLabel": "Ecosystem Test Execution",
+ "simStepDescription": "The `runTest` function is invoked. It identifies the ecosystem as 'docker' and calls `assembleEcosystemPayloads` to begin the scanning process using the appropriate plugin.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "592",
+ "endLine": "600",
+ "relevantVariables": [
+ "getPayloads",
+ "getEcosystem",
+ "isLocal",
+ "assembleEcosystemPayloads"
+ ]
+ },
+ "inputDataExample": "{\n \"ecosystem\": \"docker\",\n \"options\": {\n \"docker\": true,\n \"path\": \"ubuntu:latest\"\n }\n}",
+ "outputDataExample": "{\n \"status\": \"Proceeding to invoke docker plugin\"\n}"
+ },
+ {
+ "simStepId": "5f5decb1-8823-4fb6-932a-0e47abab9d20",
+ "diagramNodeId": "39ce2296-aa4d-45d7-90cc-3aa3bb34baa2",
+ "simStepLabel": "Plugin Invocation",
+ "simStepDescription": "The core test function invokes the `snyk-docker-plugin` with the image name and scan options to initiate the image analysis.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/assemble-payloads.ts",
+ "startLine": "22",
+ "endLine": "26",
+ "relevantVariables": [
+ "options.docker",
+ "analysisTypeText"
+ ]
+ },
+ "inputDataExample": "{\n \"ecosystem\": \"docker\",\n \"options\": {\n \"docker\": true,\n \"path\": \"ubuntu:latest\"\n }\n}",
+ "outputDataExample": "{\n \"ecosystem\": \"docker\",\n \"options\": {\n \"docker\": true,\n \"path\": \"ubuntu:latest\"\n }\n}"
+ },
+ {
+ "simStepId": "e31e64c1-4eda-4e2c-92c8-309ed2c01e7c",
+ "diagramNodeId": "67b965d1-eb5f-4758-af6b-eb5194ddb55a",
+ "simStepLabel": "Image Inspection by Plugin",
+ "simStepDescription": "The `snyk-docker-plugin` inspects the container image. It analyzes layers, identifies the OS and its packages (e.g., deb, apk), and scans for application dependencies (e.g., JARs, npm packages). It then constructs dependency graphs for all identified components.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/ecosystems/plugins.ts",
+ "startLine": "12",
+ "endLine": "12",
+ "relevantVariables": [
+ "dockerPlugin"
+ ]
+ },
+ "inputDataExample": "{\n \"options\": {\n \"path\": \"ubuntu:latest\",\n \"docker\": true\n }\n}",
+ "outputDataExample": "{\n \"scanResults\": [\n {\n \"facts\": [\n {\n \"type\": \"depGraph\",\n \"data\": {\n \"schemaVersion\": \"1.2.0\",\n \"pkgManager\": {\n \"name\": \"deb\"\n },\n \"pkgs\": [\n {\n \"id\": \"docker-image|ubuntu@latest\",\n \"info\": {\n \"name\": \"docker-image|ubuntu\",\n \"version\": \"latest\"\n }\n }\n ],\n \"graph\": {\n \"rootNodeId\": \"root-node\",\n \"nodes\": []\n }\n }\n }\n ],\n \"identity\": {\n \"type\": \"deb\"\n },\n \"target\": {\n \"image\": \"docker-image|ubuntu\"\n }\n }\n ]\n}"
+ },
+ {
+ "simStepId": "b852328f-6f6c-4abf-865b-877cd1eeb3f1",
+ "diagramNodeId": "bbf01ef4-925a-4604-99a3-979dc79e0670",
+ "simStepLabel": "Scan Result Transmission",
+ "simStepDescription": "The plugin returns an array of `scanResult` objects, one for the OS packages and potentially more for any applications found within the image, back to the core testing function.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "607",
+ "endLine": "607",
+ "relevantVariables": [
+ "payloads"
+ ]
+ },
+ "inputDataExample": "{\n \"scanResults\": [\n {\n \"facts\": [\n {\n \"type\": \"depGraph\",\n \"data\": {}\n }\n ],\n \"identity\": {\n \"type\": \"deb\"\n },\n \"target\": {\n \"image\": \"docker-image|ubuntu\"\n }\n }\n ]\n}",
+ "outputDataExample": "{\n \"scanResults\": [\n {\n \"facts\": [\n {\n \"type\": \"depGraph\",\n \"data\": {}\n }\n ],\n \"identity\": {\n \"type\": \"deb\"\n },\n \"target\": {\n \"image\": \"docker-image|ubuntu\"\n }\n }\n ]\n}"
+ },
+ {
+ "simStepId": "95d173c1-33b2-404b-b876-d38f5c6b6eb7",
+ "diagramNodeId": "32359976-69b4-481a-acec-c87e0a8adc54",
+ "simStepLabel": "Prepare API Request",
+ "simStepDescription": "The `runTest` function iterates through the payloads returned by the plugin and constructs the final request body to be sent to the Snyk API for vulnerability analysis.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "302",
+ "endLine": "310",
+ "relevantVariables": [
+ "prepareResponseForParsing",
+ "payloadBody"
+ ]
+ },
+ "inputDataExample": "{\n \"payloads\": [\n {\n \"facts\": [\n {\n \"type\": \"depGraph\",\n \"data\": {}\n }\n ],\n \"identity\": {\n \"type\": \"deb\"\n },\n \"target\": {\n \"image\": \"docker-image|ubuntu\"\n }\n }\n ]\n}",
+ "outputDataExample": "{\n \"requestBody\": {\n \"scanResult\": {\n \"facts\": [\n {\n \"type\": \"depGraph\",\n \"data\": {}\n }\n ],\n \"identity\": {\n \"type\": \"deb\"\n },\n \"target\": {\n \"image\": \"docker-image|ubuntu\"\n }\n }\n }\n}"
+ },
+ {
+ "simStepId": "c6586631-d249-435c-965a-236f0004727c",
+ "diagramNodeId": "dd88c6e4-fbf4-446d-a002-ccb3d386253b",
+ "simStepLabel": "Send Scan Data to Snyk API",
+ "simStepDescription": "A POST request containing the dependency graph and image metadata is sent to the Snyk API's `/test-dependencies` endpoint.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "315",
+ "endLine": "315",
+ "relevantVariables": [
+ "request"
+ ]
+ },
+ "inputDataExample": "{\n \"depGraph\": {},\n \"targetFile\": \"Dockerfile\",\n \"projectName\": \"my-app\",\n \"docker\": {\n \"baseImage\": \"ubuntu\"\n }\n}",
+ "outputDataExample": "{\n \"depGraph\": {},\n \"targetFile\": \"Dockerfile\",\n \"projectName\": \"my-app\",\n \"docker\": {\n \"baseImage\": \"ubuntu\"\n }\n}"
+ },
+ {
+ "simStepId": "ec2ecf88-bea3-44f8-a9b2-3d9cbc4614cb",
+ "diagramNodeId": "7ce21ea9-90c1-4e12-9e5c-beba8eb2f732",
+ "simStepLabel": "Process API Response",
+ "simStepDescription": "The CLI receives the API response containing vulnerability data. It processes this response, augmenting each vulnerability with Docker-specific context like the Dockerfile instruction or base image where it was introduced.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "486",
+ "endLine": "495",
+ "relevantVariables": [
+ "res.docker",
+ "dockerfilePackages",
+ "vuln",
+ "dockerfilePackage.installCommand",
+ "res.docker.baseImage"
+ ]
+ },
+ "inputDataExample": "{\n \"ok\": false,\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-DEBIAN10-APT-12345\",\n \"name\": \"apt\",\n \"version\": \"1.8.2\"\n }\n ],\n \"docker\": {\n \"baseImage\": \"debian:10\"\n }\n}",
+ "outputDataExample": "{\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-DEBIAN10-APT-12345\",\n \"name\": \"apt\",\n \"version\": \"1.8.2\",\n \"dockerBaseImage\": \"debian:10\"\n }\n ]\n}"
+ },
+ {
+ "simStepId": "5dd9ab50-00f4-420b-91c5-09ebe74d7a86",
+ "diagramNodeId": "95edb03e-789b-42eb-bcd6-8d10292433df",
+ "simStepLabel": "Pass Test Results to Formatter",
+ "simStepDescription": "The processed `TestResult` object, enriched with vulnerability and remediation data, is passed to the formatting module to be prepared for display.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "347",
+ "endLine": "347",
+ "relevantVariables": [
+ "displayResult"
+ ]
+ },
+ "inputDataExample": "{\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-DEBIAN10-APT-12345\",\n \"name\": \"apt\",\n \"dockerBaseImage\": \"debian:10\",\n \"isUpgradable\": true\n }\n ],\n \"docker\": {\n \"baseImage\": \"debian:10\",\n \"baseImageRemediation\": {\n \"advice\": [{ \"message\": \"Upgrade base image to debian:11\" }]\n }\n }\n}",
+ "outputDataExample": "{\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-DEBIAN10-APT-12345\",\n \"name\": \"apt\",\n \"dockerBaseImage\": \"debian:10\",\n \"isUpgradable\": true\n }\n ],\n \"docker\": {\n \"baseImage\": \"debian:10\",\n \"baseImageRemediation\": {\n \"advice\": [{ \"message\": \"Upgrade base image to debian:11\" }]\n }\n }\n}"
+ },
+ {
+ "simStepId": "3e878605-ffbe-4b24-8218-68814b7d1386",
+ "diagramNodeId": "9c44a528-5124-4af7-942f-de5a8bcef05b",
+ "simStepLabel": "Format Vulnerability Results",
+ "simStepDescription": "The formatting module generates a human-readable output string. This includes a summary of the test, details for each vulnerability, and specific advice for container images, such as base image upgrade recommendations.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/formatters/test/display-result.ts",
+ "startLine": "29",
+ "endLine": "132",
+ "relevantVariables": [
+ "displayResult",
+ "formatTestMeta",
+ "dockerRemediationForDisplay",
+ "getDisplayedOutput"
+ ]
+ },
+ "inputDataExample": "{\n \"vulnerabilities\": [\n {\n \"id\": \"SNYK-DEBIAN10-APT-12345\",\n \"name\": \"apt\",\n \"dockerBaseImage\": \"debian:10\"\n }\n ],\n \"docker\": {\n \"baseImage\": \"debian:10\",\n \"baseImageRemediation\": {\n \"advice\": [{ \"message\": \"Upgrade base image to debian:11\" }]\n }\n }\n}",
+ "outputDataExample": "{\n \"formattedString\": \"Organization: my-org\\nDocker image: ubuntu:latest\\nBase image: debian:10\\n\\n... 1 vulnerable dependency path ...\\n\\nRecommendations for base image upgrade:\\n- Upgrade debian:10 to debian:11 to fix 1 vulnerability\\n\"\n}"
+ },
+ {
+ "simStepId": "fd9313e4-f193-4379-8299-8cee4b0c6a42",
+ "diagramNodeId": "a317af9a-f54b-49e5-8186-6d435a8ee88f",
+ "simStepLabel": "Return Formatted String to CLI",
+ "simStepDescription": "The final formatted report string is returned to the top-level command handler for printing.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "src/lib/snyk-test/run-test.ts",
+ "startLine": "382",
+ "endLine": "382",
+ "relevantVariables": [
+ "displayResult"
+ ]
+ },
+ "inputDataExample": "{\n \"formattedString\": \"Organization: my-org\\nDocker image: ubuntu:latest\\n...\"\n}",
+ "outputDataExample": "{\n \"formattedString\": \"Organization: my-org\\nDocker image: ubuntu:latest\\n...\"\n}"
+ },
+ {
+ "simStepId": "b34213b2-a09b-4926-a190-90e241f96556",
+ "diagramNodeId": "4d0accd1-68e0-4590-826c-0bf21c071a2d",
+ "simStepLabel": "Display Results in Console",
+ "simStepDescription": "The main `test` command handler prints the final formatted string to the console and then exits with the appropriate status code (1 if vulnerabilities are found, 0 otherwise).",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "src/cli/commands/test/index.ts",
+ "startLine": "148",
+ "endLine": "153",
+ "relevantVariables": [
+ "snyk.test",
+ "res",
+ "displayResult"
+ ]
+ },
+ "inputDataExample": "{\n \"formattedString\": \"Organization: my-org\\nDocker image: ubuntu:latest\\n\\n... 1 vulnerable dependency path ...\\n\"\n}",
+ "outputDataExample": "null"
+ }
+ ],
+ "description": "- This feature extends vulnerability scanning to containerized applications, a critical component of modern software delivery
- - A user runs
snyk container test - - The CLI inspects the specified container image, analyzing its layers to identify the base OS and its packages (e
- g
- , deb, apk, rpm)
- - It also scans for application dependencies (e
- g
- , JAR files, npm packages) within the image
- - The report shows vulnerabilities in both the OS packages and the application dependencies, providing a comprehensive security overview of the image
",
+ "simulationNodesAndEdges": {
+ "17dee647-c7e6-4342-8c36-e73289cf6d7c": {
+ "simStepIds": [
+ "587a712f-f06c-4356-9789-ecfbe1f45384"
+ ]
+ },
+ "950404fa-f4bb-4054-9691-5ad1fa8a51d7": {
+ "simStepIds": [
+ "7c6a3c19-c15b-4314-bc8e-c95d466b9df8"
+ ]
+ },
+ "67b965d1-eb5f-4758-af6b-eb5194ddb55a": {
+ "simStepIds": [
+ "e31e64c1-4eda-4e2c-92c8-309ed2c01e7c"
+ ]
+ },
+ "32359976-69b4-481a-acec-c87e0a8adc54": {
+ "simStepIds": [
+ "95d173c1-33b2-404b-b876-d38f5c6b6eb7"
+ ]
+ },
+ "7ce21ea9-90c1-4e12-9e5c-beba8eb2f732": {
+ "simStepIds": [
+ "ec2ecf88-bea3-44f8-a9b2-3d9cbc4614cb"
+ ]
+ },
+ "9c44a528-5124-4af7-942f-de5a8bcef05b": {
+ "simStepIds": [
+ "3e878605-ffbe-4b24-8218-68814b7d1386"
+ ]
+ },
+ "4d0accd1-68e0-4590-826c-0bf21c071a2d": {
+ "simStepIds": [
+ "b34213b2-a09b-4926-a190-90e241f96556"
+ ]
+ },
+ "e26a7a82-c3e1-4eb7-8584-a8049de3795e": {
+ "simStepIds": [
+ "9a2da392-1a53-4219-b26d-33618d0555fb"
+ ]
+ },
+ "39ce2296-aa4d-45d7-90cc-3aa3bb34baa2": {
+ "simStepIds": [
+ "5f5decb1-8823-4fb6-932a-0e47abab9d20"
+ ]
+ },
+ "bbf01ef4-925a-4604-99a3-979dc79e0670": {
+ "simStepIds": [
+ "b852328f-6f6c-4abf-865b-877cd1eeb3f1"
+ ]
+ },
+ "dd88c6e4-fbf4-446d-a002-ccb3d386253b": {
+ "simStepIds": [
+ "c6586631-d249-435c-965a-236f0004727c"
+ ]
+ },
+ "95edb03e-789b-42eb-bcd6-8d10292433df": {
+ "simStepIds": [
+ "5dd9ab50-00f4-420b-91c5-09ebe74d7a86"
+ ]
+ },
+ "a317af9a-f54b-49e5-8186-6d435a8ee88f": {
+ "simStepIds": [
+ "fd9313e4-f193-4379-8299-8cee4b0c6a42"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "container test, docker, app-vulns",
+ "generationPrompt": "Scan container images for vulnerabilities",
+ "generationKeywords": "container test, docker, app-vulns"
+ },
+ "Scan Infrastructure as Code (IaC) files for misconfigurations": {
+ "name": "Scan Infrastructure as Code (IaC) files for misconfigurations",
+ "simSteps": [
+ {
+ "simStepId": "0d610bd9-4b7a-4394-a94d-7e9ab0220bb5",
+ "diagramNodeId": "d40516fd-463a-4d22-ac46-9ccc199f9a64",
+ "simStepLabel": "Command Invocation: `snyk iac test`",
+ "simStepDescription": "The user executes the `snyk iac test` command with a path to a directory containing Infrastructure as Code files. The CLI framework parses the command and its arguments, and delegates execution to the main `iac test` function.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts",
+ "startLine": "23",
+ "endLine": "57",
+ "relevantVariables": [
+ "args",
+ "options",
+ "scan"
+ ]
+ },
+ "inputDataExample": "{\n \"command\": \"snyk iac test ./iac/terraform\"\n}",
+ "outputDataExample": "{\n \"args\": [\n \"./iac/terraform\"\n ],\n \"options\": {\n \"org\": null,\n \"json\": false,\n \"sarif\": false\n }\n}"
+ },
+ {
+ "simStepId": "f6e1ec2b-b6e2-47f1-8824-62fbef34d6ec",
+ "diagramNodeId": "7a8f0002-4159-498f-8d19-6a8e8b13460f",
+ "simStepLabel": "Pass Paths to Scan Logic",
+ "simStepDescription": "The validated paths and options are passed from the command handler to the core scanning logic, which will orchestrate the file discovery, parsing, and scanning process.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/scan.ts",
+ "startLine": "44",
+ "endLine": "44",
+ "relevantVariables": [
+ "iacTest"
+ ]
+ },
+ "inputDataExample": "{\n \"paths\": [\n \"./iac/terraform\"\n ],\n \"options\": {}\n}",
+ "outputDataExample": "{\n \"paths\": [\n \"./iac/terraform\"\n ],\n \"options\": {}\n}"
+ },
+ {
+ "simStepId": "7bb3e65e-b598-465d-babc-5a3357482b7b",
+ "diagramNodeId": "2a2136a1-26d6-4b85-8eed-6f0362aef3a1",
+ "simStepLabel": "Discover IaC Files in Directory",
+ "simStepDescription": "The system recursively scans the provided directory path to find all files. It then filters this list to include only files with supported IaC extensions like `.tf`, `.yaml`, `.yml`, and `.json`.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts",
+ "startLine": "57",
+ "endLine": "65",
+ "relevantVariables": [
+ "getAllDirectoriesForPath",
+ "getFilesForDirectory"
+ ]
+ },
+ "inputDataExample": "{\n \"pathToScan\": \"./iac/terraform\",\n \"options\": {\n \"detectionDepth\": null\n }\n}",
+ "outputDataExample": "[\n \"./iac/terraform/sg_open_ssh.tf\",\n \"./iac/terraform/empty_file.tf\",\n \"./iac/terraform/vars.tf\"\n]"
+ },
+ {
+ "simStepId": "3f061a24-dabb-4bdd-a6f3-4e1e5160c370",
+ "diagramNodeId": "cfca8a58-793d-4900-a07b-ce67c880adcc",
+ "simStepLabel": "Send File Paths for Parsing",
+ "simStepDescription": "The list of discovered IaC file paths, along with their contents, is sent to the parsing module to be converted into a structured format.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts",
+ "startLine": "68",
+ "endLine": "68",
+ "relevantVariables": [
+ "parseFiles"
+ ]
+ },
+ "inputDataExample": "[{\n \"filePath\": \"./iac/terraform/sg_open_ssh.tf\",\n \"fileContent\": \"resource \\\"aws_security_group\\\" \\\"allow_ssh\\\" {\\n name = \\\"allow_ssh\\\"\\n description = \\\"Allow SSH inbound from anywhere\\\"\\n vpc_id = \\\"123\\\"\\n\\n ingress {\\n from_port = 22\\n to_port = 22\\n protocol = \\\"tcp\\\"\\n cidr_blocks = [\\\"0.0.0.0/0\\\"]\\n }\\n}\",\n \"fileType\": \"tf\"\n}]",
+ "outputDataExample": "[{\n \"filePath\": \"./iac/terraform/sg_open_ssh.tf\",\n \"fileContent\": \"resource \\\"aws_security_group\\\" \\\"allow_ssh\\\" {\\n name = \\\"allow_ssh\\\"\\n description = \\\"Allow SSH inbound from anywhere\\\"\\n vpc_id = \\\"123\\\"\\n\\n ingress {\\n from_port = 22\\n to_port = 22\\n protocol = \\\"tcp\\\"\\n cidr_blocks = [\\\"0.0.0.0/0\\\"]\\n }\\n}\",\n \"fileType\": \"tf\"\n}]"
+ },
+ {
+ "simStepId": "53a50076-1327-4f49-8529-b8e1d95c4fb5",
+ "diagramNodeId": "09d6740f-3538-4c0a-a1c5-42118a8af84c",
+ "simStepLabel": "Parse IaC File Content",
+ "simStepDescription": "The file parser determines the file type (Terraform, Kubernetes, etc.) and uses the appropriate parsing logic. For Terraform files, it converts the HCL syntax into a structured JSON object. It also handles special cases like Terraform Plan files.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts",
+ "startLine": "63",
+ "endLine": "134",
+ "relevantVariables": [
+ "parseFiles",
+ "tryParseIacFile",
+ "parseTerraformFiles"
+ ]
+ },
+ "inputDataExample": "[{\n \"filePath\": \"./iac/terraform/sg_open_ssh.tf\",\n \"fileContent\": \"resource \\\"aws_security_group\\\" \\\"allow_ssh\\\" { ... }\",\n \"fileType\": \"tf\"\n}]",
+ "outputDataExample": "{\n \"parsedFiles\": [\n {\n \"filePath\": \"./iac/terraform/sg_open_ssh.tf\",\n \"fileType\": \"tf\",\n \"projectType\": \"terraformconfig\",\n \"engineType\": 1,\n \"jsonContent\": {\n \"resource\": {\n \"aws_security_group\": {\n \"allow_ssh\": {\n \"name\": \"allow_ssh\",\n \"description\": \"Allow SSH inbound from anywhere\",\n \"vpc_id\": \"123\",\n \"ingress\": [\n {\n \"from_port\": 22,\n \"to_port\": 22,\n \"protocol\": \"tcp\",\n \"cidr_blocks\": [\n \"0.0.0.0/0\"\n ]\n }\n ]\n }\n }\n }\n }\n }\n ],\n \"failedFiles\": []\n}"
+ },
+ {
+ "simStepId": "86554b35-33a3-4fc4-bdf5-d218b842e89a",
+ "diagramNodeId": "bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763",
+ "simStepLabel": "Send Parsed Files to Scanner",
+ "simStepDescription": "The structured JSON objects representing the IaC files are passed to the scanning engine for security analysis.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts",
+ "startLine": "75",
+ "endLine": "75",
+ "relevantVariables": [
+ "scanFiles"
+ ]
+ },
+ "inputDataExample": "[{\n \"filePath\": \"./iac/terraform/sg_open_ssh.tf\",\n \"fileType\": \"tf\",\n \"projectType\": \"terraformconfig\",\n \"engineType\": 1,\n \"jsonContent\": { ... }\n}]",
+ "outputDataExample": "[{\n \"filePath\": \"./iac/terraform/sg_open_ssh.tf\",\n \"fileType\": \"tf\",\n \"projectType\": \"terraformconfig\",\n \"engineType\": 1,\n \"jsonContent\": { ... }\n}]"
+ },
+ {
+ "simStepId": "9f1609b0-7cca-43d9-ac49-d96eefddadbd",
+ "diagramNodeId": "f488ec87-4b4f-4f04-a319-2ae372ff6c7d",
+ "simStepLabel": "Scan Files with Policy Engine",
+ "simStepDescription": "The scanner loads the appropriate policy engine (a WASM bundle and data file) for the file's engine type (e.g., Terraform). It then executes the engine, providing the parsed JSON content as input. The engine evaluates the configuration against a set of security rules.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts",
+ "startLine": "16",
+ "endLine": "45",
+ "relevantVariables": [
+ "scanFiles",
+ "getPolicyEngine",
+ "policyEngine.evaluate"
+ ]
+ },
+ "inputDataExample": "[{\n \"engineType\": 1,\n \"projectType\": \"terraformconfig\",\n \"filePath\": \"./iac/terraform/sg_open_ssh.tf\",\n \"jsonContent\": { ... }\n}]",
+ "outputDataExample": "[{\n \"violatedPolicies\": [\n {\n \"publicId\": \"SNYK-CC-TF-1\",\n \"title\": \"Security Group allows open ingress\",\n \"severity\": \"medium\",\n \"msg\": \"resource.aws_security_group[allow_ssh].ingress[0]\",\n \"remediation\": {\n \"terraform\": \"Set `cidr_block` attribute with a more restrictive IP, for example `192.16.0.0/24`\"\n }\n }\n ],\n \"projectType\": \"terraformconfig\",\n \"targetFile\": \"./iac/terraform/sg_open_ssh.tf\"\n}]"
+ },
+ {
+ "simStepId": "585c196a-cd46-4c51-ae04-dc8efd241ad1",
+ "diagramNodeId": "7f4f9897-ca3b-4aa9-9c72-6ed854b8319e",
+ "simStepLabel": "Send Raw Results for Formatting",
+ "simStepDescription": "The raw scan results, containing a list of violated policies for each file, are passed to the results processor for formatting.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts",
+ "startLine": "119",
+ "endLine": "119",
+ "relevantVariables": [
+ "resultsProcessor.process"
+ ]
+ },
+ "inputDataExample": "[{\n \"violatedPolicies\": [ { \"publicId\": \"SNYK-CC-TF-1\", ... } ],\n \"projectType\": \"terraformconfig\",\n \"targetFile\": \"./iac/terraform/sg_open_ssh.tf\"\n}]",
+ "outputDataExample": "[{\n \"violatedPolicies\": [ { \"publicId\": \"SNYK-CC-TF-1\", ... } ],\n \"projectType\": \"terraformconfig\",\n \"targetFile\": \"./iac/terraform/sg_open_ssh.tf\"\n}]"
+ },
+ {
+ "simStepId": "c8fb9227-5b43-4a25-8daf-7e99770617ec",
+ "diagramNodeId": "2b39850a-eb17-451c-a8c7-c7d8a244a765",
+ "simStepLabel": "Format Scan Results",
+ "simStepDescription": "The results processor enriches the raw scan results with detailed information for each issue, such as impact, resolution steps, and documentation links. It also applies any ignores from `.snyk` policy files and filters results based on the severity threshold.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts",
+ "startLine": "11",
+ "endLine": "53",
+ "relevantVariables": [
+ "formatScanResults",
+ "formatIacTestResult"
+ ]
+ },
+ "inputDataExample": "[{\n \"violatedPolicies\": [ { \"publicId\": \"SNYK-CC-TF-1\", \"title\": \"Security Group allows open ingress\", ... } ],\n \"targetFile\": \"./iac/terraform/sg_open_ssh.tf\"\n}]",
+ "outputDataExample": "[{\n \"result\": {\n \"cloudConfigResults\": [\n {\n \"id\": \"SNYK-CC-TF-1\",\n \"publicId\": \"SNYK-CC-TF-1\",\n \"title\": \"Security Group allows open ingress\",\n \"severity\": \"medium\",\n \"isIgnored\": false,\n \"path\": [\"resource\", \"aws_security_group\", \"allow_ssh\", \"ingress\"],\n \"remediation\": { \"terraform\": \"...\" }\n }\n ]\n },\n \"targetFile\": \"./iac/terraform/sg_open_ssh.tf\",\n \"projectType\": \"terraformconfig\"\n}]"
+ },
+ {
+ "simStepId": "28bc0fc7-3a19-403a-b515-8053d058c231",
+ "diagramNodeId": "bf67abac-660c-4a96-901e-43ab54491b86",
+ "simStepLabel": "Pass Formatted Results to Output Handler",
+ "simStepDescription": "The final, enriched, and formatted test results are sent to the output module to be displayed to the user.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/scan.ts",
+ "startLine": "62",
+ "endLine": "62",
+ "relevantVariables": [
+ "buildOutput"
+ ]
+ },
+ "inputDataExample": "{\n \"results\": [\n {\n \"result\": {\n \"cloudConfigResults\": [ ... ]\n },\n \"targetFile\": \"./iac/terraform/sg_open_ssh.tf\",\n \"projectType\": \"terraformconfig\"\n }\n ],\n \"failures\": []\n}",
+ "outputDataExample": "{\n \"results\": [\n {\n \"result\": {\n \"cloudConfigResults\": [ ... ]\n },\n \"targetFile\": \"./iac/terraform/sg_open_ssh.tf\",\n \"projectType\": \"terraformconfig\"\n }\n ],\n \"failures\": []\n}"
+ },
+ {
+ "simStepId": "8017e430-d4ab-4001-99b7-073177b5e2a9",
+ "diagramNodeId": "02dede36-57b9-46a8-9b12-d832a4263d36",
+ "simStepLabel": "Display Formatted Output",
+ "simStepDescription": "The output handler takes the formatted results and generates the final output string based on the user's requested format (`--json`, `--sarif`, or default human-readable text). This string is then printed to the console.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts",
+ "startLine": "45",
+ "endLine": "100",
+ "relevantVariables": [
+ "buildOutput",
+ "formatIacTestAsText",
+ "formatIacTestAsJson",
+ "formatIacTestAsSarif"
+ ]
+ },
+ "inputDataExample": "{\n \"results\": [\n {\n \"result\": {\n \"cloudConfigResults\": [ ... ]\n },\n \"targetFile\": \"./iac/terraform/sg_open_ssh.tf\", ...\n }\n ],\n \"failures\": []\n}",
+ "outputDataExample": "\"Snyk Infrastructure as Code\\n\\nTesting ./iac/terraform/sg_open_ssh.tf...\\n\\nTest completed.\\n\\nIssues\\n\\n [Medium] Security Group allows open ingress\\n Info: That inbound traffic is allowed to a resource from any source instead of a restricted range\\n Rule: https://security.snyk.io/rules/cloud/SNYK-CC-TF-1\\n Path: resource > aws_security_group[allow_ssh] > ingress\\n\\nTest Summary\\n\\n Organization: test-org\\n Project name: sg_open_ssh.tf\\n\\n✔ Files without issues: 0\\n✗ Files with issues: 1\\n\n\""
+ }
+ ],
+ "description": "- This enables developers to find and fix security issues in their cloud infrastructure configurations before deployment
- - A user runs
snyk iac test on directories containing IaC files - - The CLI scans for configuration files like Terraform (
- tf), Kubernetes (
- yaml), CloudFormation, and ARM templates
- - It evaluates these files against a comprehensive set of security rules to identify misconfigurations, such as overly permissive firewall rules or public S3 buckets
- - Results are displayed with context and remediation guidance, helping to secure cloud environments from the start
",
+ "simulationNodesAndEdges": {
+ "d40516fd-463a-4d22-ac46-9ccc199f9a64": {
+ "simStepIds": [
+ "0d610bd9-4b7a-4394-a94d-7e9ab0220bb5"
+ ]
+ },
+ "2a2136a1-26d6-4b85-8eed-6f0362aef3a1": {
+ "simStepIds": [
+ "7bb3e65e-b598-465d-babc-5a3357482b7b"
+ ]
+ },
+ "09d6740f-3538-4c0a-a1c5-42118a8af84c": {
+ "simStepIds": [
+ "53a50076-1327-4f49-8529-b8e1d95c4fb5"
+ ]
+ },
+ "f488ec87-4b4f-4f04-a319-2ae372ff6c7d": {
+ "simStepIds": [
+ "9f1609b0-7cca-43d9-ac49-d96eefddadbd"
+ ]
+ },
+ "2b39850a-eb17-451c-a8c7-c7d8a244a765": {
+ "simStepIds": [
+ "c8fb9227-5b43-4a25-8daf-7e99770617ec"
+ ]
+ },
+ "02dede36-57b9-46a8-9b12-d832a4263d36": {
+ "simStepIds": [
+ "8017e430-d4ab-4001-99b7-073177b5e2a9"
+ ]
+ },
+ "7a8f0002-4159-498f-8d19-6a8e8b13460f": {
+ "simStepIds": [
+ "f6e1ec2b-b6e2-47f1-8824-62fbef34d6ec"
+ ]
+ },
+ "cfca8a58-793d-4900-a07b-ce67c880adcc": {
+ "simStepIds": [
+ "3f061a24-dabb-4bdd-a6f3-4e1e5160c370"
+ ]
+ },
+ "bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763": {
+ "simStepIds": [
+ "86554b35-33a3-4fc4-bdf5-d218b842e89a"
+ ]
+ },
+ "7f4f9897-ca3b-4aa9-9c72-6ed854b8319e": {
+ "simStepIds": [
+ "585c196a-cd46-4c51-ae04-dc8efd241ad1"
+ ]
+ },
+ "bf67abac-660c-4a96-901e-43ab54491b86": {
+ "simStepIds": [
+ "28bc0fc7-3a19-403a-b515-8053d058c231"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "iac test, local-execution, terraform",
+ "generationPrompt": "Scan Infrastructure as Code (IaC) files for misconfigurations",
+ "generationKeywords": "iac test, local-execution, terraform"
+ },
+ "Authenticate the CLI with a Snyk account": {
+ "name": "Authenticate the CLI with a Snyk account",
+ "simSteps": [
+ {
+ "simStepId": "d272eaa7-ead0-48f4-8297-17ee2edb70ee",
+ "diagramNodeId": "019d9dd3-a90b-46d4-b6f9-e38d658a5540",
+ "simStepLabel": "Flow 1 (Token): Auth Command Handler",
+ "simStepDescription": "The user runs `snyk auth `. The main function in `src/cli/commands/auth/index.ts` receives the token as an argument and determines that a token was provided, opting to verify it directly.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "125",
+ "endLine": "125",
+ "relevantVariables": [
+ "verifyAPI",
+ "apiToken"
+ ]
+ },
+ "inputDataExample": "{\"args\": [\"auth\", \"12345678-1234-1234-1234-1234567890ab\"]}",
+ "outputDataExample": "{\"apiToken\": \"12345678-1234-1234-1234-1234567890ab\"}"
+ },
+ {
+ "simStepId": "0bb640b2-6aea-444b-8f66-16ecf5159687",
+ "diagramNodeId": "a634b412-e8ad-4445-afb7-6aa147745211",
+ "simStepLabel": "Flow 1 (Token): Pass Token to `verifyAPI`",
+ "simStepDescription": "The provided API token is passed as an argument to the `verifyAPI` function for validation.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "125",
+ "endLine": "125",
+ "relevantVariables": [
+ "verifyAPI(apiToken)"
+ ]
+ },
+ "inputDataExample": "{\"apiToken\": \"12345678-1234-1234-1234-1234567890ab\"}",
+ "outputDataExample": "{\"apiToken\": \"12345678-1234-1234-1234-1234567890ab\"}"
+ },
+ {
+ "simStepId": "bd504c66-5262-4759-9652-788c78022410",
+ "diagramNodeId": "b6ddda51-6d63-43cc-ba18-9228f6a0db94",
+ "simStepLabel": "Flow 1 (Token): Prepare Verification Request",
+ "simStepDescription": "The `verifyAPI` function in `src/cli/commands/auth/verify.ts` receives the token and constructs a payload for an HTTP POST request to the `/verify/token` API endpoint.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts",
+ "startLine": "4",
+ "endLine": "11",
+ "relevantVariables": [
+ "verifyAPI",
+ "payload",
+ "config.API"
+ ]
+ },
+ "inputDataExample": "{\"api\": \"12345678-1234-1234-1234-1234567890ab\"}",
+ "outputDataExample": "{\"payload\": {\"body\": {\"api\": \"12345678-1234-1234-1234-1234567890ab\"}, \"method\": \"POST\", \"url\": \"https://api.snyk.io/verify/token\", \"json\": true}}"
+ },
+ {
+ "simStepId": "a3409c09-dca1-40e4-a81a-948021bab75e",
+ "diagramNodeId": "a449bc86-9fbd-4910-b917-3905685a2598",
+ "simStepLabel": "Flow 1 (Token): API Call to Snyk",
+ "simStepDescription": "An HTTP request containing the token is sent to the Snyk API for verification using the `makeRequest` function.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts",
+ "startLine": "13",
+ "endLine": "24",
+ "relevantVariables": [
+ "makeRequest",
+ "payload"
+ ]
+ },
+ "inputDataExample": "{\"payload\": {\"body\": {\"api\": \"12345678-1234-1234-1234-1234567890ab\"}, \"method\": \"POST\", \"url\": \"https://api.snyk.io/verify/token\", \"json\": true}}",
+ "outputDataExample": "{\"payload\": {\"body\": {\"api\": \"12345678-1234-1234-1234-1234567890ab\"}, \"method\": \"POST\", \"url\": \"https://api.snyk.io/verify/token\", \"json\": true}}"
+ },
+ {
+ "simStepId": "bb8323cf-b3be-4b7a-bfdf-b00724fd94d2",
+ "diagramNodeId": "46b53f46-d7b9-4dc5-b511-37b341d206b3",
+ "simStepLabel": "Flow 1 (Token): Handle API Response",
+ "simStepDescription": "The promise from `verifyAPI` resolves, and the `.then()` handler in the main `auth` command function is executed. It checks the HTTP status code for success (200 or 201).",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "129",
+ "endLine": "141",
+ "relevantVariables": [
+ "promise.then",
+ "data",
+ "res.statusCode",
+ "body"
+ ]
+ },
+ "inputDataExample": "{\"data\": {\"res\": {\"statusCode\": 200, \"body\": {\"ok\": true, \"api\": \"12345678-1234-1234-1234-1234567890ab\"}}, \"body\": {\"ok\": true, \"api\": \"12345678-1234-1234-1234-1234567890ab\"}}}",
+ "outputDataExample": "{\"apiToken\": \"12345678-1234-1234-1234-1234567890ab\"}"
+ },
+ {
+ "simStepId": "6a031992-4b15-4124-b0d6-8c58fcdacebd",
+ "diagramNodeId": "69fd0286-e062-407c-bd1e-09253cc8869a",
+ "simStepLabel": "Flow 1 (Token): Pass Token for Configuration",
+ "simStepDescription": "The validated API token is extracted from the response body and passed to the `snyk.config.set` function to be saved.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "135",
+ "endLine": "135",
+ "relevantVariables": [
+ "snyk.config.set",
+ "body.api"
+ ]
+ },
+ "inputDataExample": "{\"apiToken\": \"12345678-1234-1234-1234-1234567890ab\"}",
+ "outputDataExample": "{\"apiToken\": \"12345678-1234-1234-1234-1234567890ab\"}"
+ },
+ {
+ "simStepId": "1f53ea1d-132d-4d0a-81c8-5e43ce78c9f7",
+ "diagramNodeId": "a7936592-81ee-4bc4-a1fe-efbd087a2662",
+ "simStepLabel": "Flow 1 (Token): Save Token to Local Config",
+ "simStepDescription": "The `snyk.config.set('api', ...)` function writes the API token to the local user configuration file, persisting the authentication. A success message is then prepared to be displayed to the user.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "135",
+ "endLine": "140",
+ "relevantVariables": [
+ "snyk.config.set"
+ ]
+ },
+ "inputDataExample": "{\"key\": \"api\", \"value\": \"12345678-1234-1234-1234-1234567890ab\"}",
+ "outputDataExample": "{\"message\": \"\\nYour account has been authenticated. Snyk is now ready to be used.\\n\"}"
+ },
+ {
+ "simStepId": "21a1edc6-531a-412d-824f-2fcf89a7c636",
+ "diagramNodeId": "389e9a12-2128-49cd-be28-08b2af738265",
+ "simStepLabel": "Flow 2 (Web): Auth Command Handler",
+ "simStepDescription": "The user runs `snyk auth` without a token. The main function in `src/cli/commands/auth/index.ts` determines that no token was provided and decides to initiate web-based authentication.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "127",
+ "endLine": "127",
+ "relevantVariables": [
+ "webAuth"
+ ]
+ },
+ "inputDataExample": "{\"args\": [\"auth\"]}",
+ "outputDataExample": "{}"
+ },
+ {
+ "simStepId": "dfe86ab2-036e-4112-942d-4c072d2495a2",
+ "diagramNodeId": "5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4",
+ "simStepLabel": "Flow 2 (Web): Call `webAuth`",
+ "simStepDescription": "The `webAuth` function is invoked to handle the browser-based authentication flow.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "127",
+ "endLine": "127",
+ "relevantVariables": [
+ "webAuth()"
+ ]
+ },
+ "inputDataExample": "{}",
+ "outputDataExample": "{}"
+ },
+ {
+ "simStepId": "8f197ea3-6a58-4ebe-b7da-ace35c8c0437",
+ "diagramNodeId": "d70cd77f-39da-4a46-968f-86fa5655a0cc",
+ "simStepLabel": "Flow 2 (Web): Initiate Web Authentication",
+ "simStepDescription": "The `webAuth` function starts a local web server to listen for a callback from the Snyk platform and constructs the authentication URL, which includes a unique token for this session.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "31",
+ "endLine": "31",
+ "relevantVariables": [
+ "webAuth",
+ "open",
+ "uuidv4"
+ ]
+ },
+ "inputDataExample": "{}",
+ "outputDataExample": "{\"authUrl\": \"https://app.snyk.io/login?token=a1b2c3d4-e5f6-7890-1234-abcdef123456&utm_medium=cli\"}"
+ },
+ {
+ "simStepId": "245b3521-8f79-4bf4-95fd-a1cd3112267d",
+ "diagramNodeId": "03356d15-72f0-48b5-8812-277ae0c6c99d",
+ "simStepLabel": "Flow 2 (Web): Open Browser for Login",
+ "simStepDescription": "The `open` library is used to launch the user's default web browser and navigate to the Snyk authentication URL for the user to log in.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "31",
+ "endLine": "31",
+ "relevantVariables": [
+ "open(url)"
+ ]
+ },
+ "inputDataExample": "{\"authUrl\": \"https://app.snyk.io/login?token=a1b2c3d4-e5f6-7890-1234-abcdef123456&utm_medium=cli\"}",
+ "outputDataExample": "{\"authUrl\": \"https://app.snyk.io/login?token=a1b2c3d4-e5f6-7890-1234-abcdef123456&utm_medium=cli\"}"
+ },
+ {
+ "simStepId": "e29be9f6-e5fc-469c-b36c-36e24fef78a4",
+ "diagramNodeId": "5f0301ca-f6e9-40e9-9e0c-3d239a0b3824",
+ "simStepLabel": "Flow 2 (Web): Receive Token via Callback",
+ "simStepDescription": "After the user authenticates on the Snyk website, the browser is redirected to the local server's callback URL (e.g., `http://localhost:12345/callback?token=...`). The local server handler within the `webAuth` function extracts the new API token from the URL query parameters.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "31",
+ "endLine": "31",
+ "relevantVariables": [
+ "webAuth"
+ ]
+ },
+ "inputDataExample": "{\"callbackUrl\": \"http://localhost:12345/callback?token=abcdef12-abcd-1234-abcd-abcdef123456\"}",
+ "outputDataExample": "{\"apiToken\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}"
+ },
+ {
+ "simStepId": "1df9cdfb-8e4a-458f-b278-3a109debb99d",
+ "diagramNodeId": "8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7",
+ "simStepLabel": "Flow 2 (Web): Pass Token for Verification",
+ "simStepDescription": "The newly received token is passed to `verifyAPI` to confirm its validity. The `webAuth` function will resolve its main promise with the result of this verification.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts",
+ "startLine": "4",
+ "endLine": "4",
+ "relevantVariables": [
+ "verifyAPI"
+ ]
+ },
+ "inputDataExample": "{\"apiToken\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}",
+ "outputDataExample": "{\"apiToken\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}"
+ },
+ {
+ "simStepId": "100156ef-69a7-4d75-a012-8e52701516bc",
+ "diagramNodeId": "b9f46af5-eb4d-4b0e-9132-1b4a0cdb5b88",
+ "simStepLabel": "Flow 2 (Web): Handle Verification Response",
+ "simStepDescription": "The promise from `webAuth` (which internally called `verifyAPI`) resolves. The `.then()` handler in the main `auth` function executes, checking the `statusCode` for success.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "129",
+ "endLine": "141",
+ "relevantVariables": [
+ "promise.then",
+ "data",
+ "res.statusCode",
+ "body"
+ ]
+ },
+ "inputDataExample": "{\"data\": {\"res\": {\"statusCode\": 200, \"body\": {\"ok\": true, \"api\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}}, \"body\": {\"ok\": true, \"api\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}}}",
+ "outputDataExample": "{\"apiToken\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}"
+ },
+ {
+ "simStepId": "b3b8840e-ffe0-492d-9b0e-d86171b0fa97",
+ "diagramNodeId": "241d3ca1-2314-4e53-882a-f16aab0e2c75",
+ "simStepLabel": "Flow 2 (Web): Pass Token for Configuration",
+ "simStepDescription": "The validated API token is extracted from the response body and passed to the `snyk.config.set` function to be saved.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "135",
+ "endLine": "135",
+ "relevantVariables": [
+ "snyk.config.set",
+ "body.api"
+ ]
+ },
+ "inputDataExample": "{\"apiToken\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}",
+ "outputDataExample": "{\"apiToken\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}"
+ },
+ {
+ "simStepId": "a6b0976a-109e-48a8-8f27-ec9c921b6a3f",
+ "diagramNodeId": "a11fe883-8ace-42b7-b5d4-49abcb0cd9d6",
+ "simStepLabel": "Flow 2 (Web): Save Token to Local Config",
+ "simStepDescription": "The `snyk.config.set('api', ...)` function writes the API token to the local user configuration file, persisting the authentication. A success message is then prepared for the user.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "startLine": "135",
+ "endLine": "140",
+ "relevantVariables": [
+ "snyk.config.set"
+ ]
+ },
+ "inputDataExample": "{\"key\": \"api\", \"value\": \"abcdef12-abcd-1234-abcd-abcdef123456\"}",
+ "outputDataExample": "{\"message\": \"\\nYour account has been authenticated. Snyk is now ready to be used.\\n\"}"
+ }
+ ],
+ "description": "- This is the foundational step required for any user to connect their local development environment to the Snyk platform
- - A user runs
snyk auth - - The CLI opens a web browser, directing the user to log in to their Snyk account
- - Upon successful login, the Snyk platform generates an API token and securely sends it back to the CLI, which saves it in the local configuration
- - Alternatively, a user can pass a token directly via an environment variable, which is common in CI/CD environments
",
+ "simulationNodesAndEdges": {
+ "019d9dd3-a90b-46d4-b6f9-e38d658a5540": {
+ "simStepIds": [
+ "d272eaa7-ead0-48f4-8297-17ee2edb70ee"
+ ]
+ },
+ "b6ddda51-6d63-43cc-ba18-9228f6a0db94": {
+ "simStepIds": [
+ "bd504c66-5262-4759-9652-788c78022410"
+ ]
+ },
+ "46b53f46-d7b9-4dc5-b511-37b341d206b3": {
+ "simStepIds": [
+ "bb8323cf-b3be-4b7a-bfdf-b00724fd94d2"
+ ]
+ },
+ "a7936592-81ee-4bc4-a1fe-efbd087a2662": {
+ "simStepIds": [
+ "1f53ea1d-132d-4d0a-81c8-5e43ce78c9f7"
+ ]
+ },
+ "389e9a12-2128-49cd-be28-08b2af738265": {
+ "simStepIds": [
+ "21a1edc6-531a-412d-824f-2fcf89a7c636"
+ ]
+ },
+ "d70cd77f-39da-4a46-968f-86fa5655a0cc": {
+ "simStepIds": [
+ "8f197ea3-6a58-4ebe-b7da-ace35c8c0437"
+ ]
+ },
+ "5f0301ca-f6e9-40e9-9e0c-3d239a0b3824": {
+ "simStepIds": [
+ "e29be9f6-e5fc-469c-b36c-36e24fef78a4"
+ ]
+ },
+ "b9f46af5-eb4d-4b0e-9132-1b4a0cdb5b88": {
+ "simStepIds": [
+ "100156ef-69a7-4d75-a012-8e52701516bc"
+ ]
+ },
+ "a11fe883-8ace-42b7-b5d4-49abcb0cd9d6": {
+ "simStepIds": [
+ "a6b0976a-109e-48a8-8f27-ec9c921b6a3f"
+ ]
+ },
+ "a634b412-e8ad-4445-afb7-6aa147745211": {
+ "simStepIds": [
+ "0bb640b2-6aea-444b-8f66-16ecf5159687"
+ ]
+ },
+ "a449bc86-9fbd-4910-b917-3905685a2598": {
+ "simStepIds": [
+ "a3409c09-dca1-40e4-a81a-948021bab75e"
+ ]
+ },
+ "69fd0286-e062-407c-bd1e-09253cc8869a": {
+ "simStepIds": [
+ "6a031992-4b15-4124-b0d6-8c58fcdacebd"
+ ]
+ },
+ "5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4": {
+ "simStepIds": [
+ "dfe86ab2-036e-4112-942d-4c072d2495a2"
+ ]
+ },
+ "03356d15-72f0-48b5-8812-277ae0c6c99d": {
+ "simStepIds": [
+ "245b3521-8f79-4bf4-95fd-a1cd3112267d"
+ ]
+ },
+ "8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7": {
+ "simStepIds": [
+ "1df9cdfb-8e4a-458f-b278-3a109debb99d"
+ ]
+ },
+ "241d3ca1-2314-4e53-882a-f16aab0e2c75": {
+ "simStepIds": [
+ "b3b8840e-ffe0-492d-9b0e-d86171b0fa97"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "snyk auth, webAuth, verifyAPI",
+ "generationPrompt": "Authenticate the CLI with a Snyk account",
+ "generationKeywords": "snyk auth, webAuth, verifyAPI"
+ },
+ "Generate a Software Bill of Materials (SBOM)": {
+ "name": "Generate a Software Bill of Materials (SBOM)",
+ "simSteps": [
+ {
+ "simStepId": "e5f0127f-0d5e-4cff-93d7-559a74ce558e",
+ "diagramNodeId": "f5274edb-f76d-406c-b9f5-b48eaff595ef",
+ "simStepLabel": "User Executes `snyk sbom` Command",
+ "simStepDescription": "A user initiates the SBOM generation process by running the `snyk sbom` command from their terminal, specifying options such as the desired format (e.g., `cyclonedx1.6+json`) and the target organization.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/help/cli-commands/sbom.md",
+ "startLine": "284",
+ "endLine": "285",
+ "relevantVariables": [
+ "$ snyk sbom --format=cyclonedx1.6+json"
+ ]
+ },
+ "inputDataExample": "null",
+ "outputDataExample": "{\n \"command\": \"snyk\",\n \"subcommand\": \"sbom\",\n \"options\": {\n \"format\": \"cyclonedx1.6+json\",\n \"org\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n }\n}"
+ },
+ {
+ "simStepId": "2b2d61a1-4c9b-4c4e-b6d6-72f04ced24eb",
+ "diagramNodeId": "20667550-4ae5-486b-8711-f032d1ab608e",
+ "simStepLabel": "Command Arguments Passed to CLI",
+ "simStepDescription": "The user's shell captures the command-line arguments and passes them to the Snyk CLI executable for processing.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts",
+ "startLine": "45",
+ "endLine": "51",
+ "relevantVariables": [
+ "runSnykCLI",
+ "`sbom --org aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee --format cyclonedx1.4+json --debug`"
+ ]
+ },
+ "inputDataExample": "{\n \"command\": \"snyk\",\n \"subcommand\": \"sbom\",\n \"options\": {\n \"format\": \"cyclonedx1.6+json\",\n \"org\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n }\n}",
+ "outputDataExample": "{\n \"command\": \"snyk\",\n \"subcommand\": \"sbom\",\n \"options\": {\n \"format\": \"cyclonedx1.6+json\",\n \"org\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n }\n}"
+ },
+ {
+ "simStepId": "e169da2c-940a-4ce4-b955-43cccdc9a50b",
+ "diagramNodeId": "83264e21-3db1-4eb0-8051-8edd66d6b78d",
+ "simStepLabel": "CLI Analyzes Project Dependencies",
+ "simStepDescription": "The Snyk CLI parses the arguments and initiates a scan of the local project directory. It identifies manifest files (e.g., package.json, pom.xml) and builds an internal dependency graph representing the project's structure, similar to a `snyk test` operation.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/help/cli-commands/sbom.md",
+ "startLine": "24",
+ "endLine": "24",
+ "relevantVariables": [
+ "The `snyk sbom` command generates an SBOM for a local software project in an ecosystem supported by Snyk."
+ ]
+ },
+ "inputDataExample": "{\n \"targetDirectory\": \"/path/to/my-npm-project\"\n}",
+ "outputDataExample": "{\n \"schemaVersion\": \"1.2.0\",\n \"pkgManager\": {\n \"name\": \"npm\"\n },\n \"pkgs\": [\n {\n \"id\": \"my-app@1.0.0\",\n \"info\": {\n \"name\": \"my-app\",\n \"version\": \"1.0.0\"\n }\n },\n {\n \"id\": \"express@4.17.1\",\n \"info\": {\n \"name\": \"express\",\n \"version\": \"4.17.1\"\n }\n },\n {\n \"id\": \"accepts@1.3.7\",\n \"info\": {\n \"name\": \"accepts\",\n \"version\": \"1.3.7\"\n }\n }\n ],\n \"graph\": {\n \"rootNodeId\": \"root-node\",\n \"nodes\": [\n {\n \"nodeId\": \"root-node\",\n \"pkgId\": \"my-app@1.0.0\",\n \"deps\": [\n {\n \"nodeId\": \"express@4.17.1\"\n }\n ]\n },\n {\n \"nodeId\": \"express@4.17.1\",\n \"pkgId\": \"express@4.17.1\",\n \"deps\": [\n {\n \"nodeId\": \"accepts@1.3.7\"\n }\n ]\n },\n {\n \"nodeId\": \"accepts@1.3.7\",\n \"pkgId\": \"accepts@1.3.7\",\n \"deps\": []\n }\n ]\n }\n}"
+ },
+ {
+ "simStepId": "73b2957d-2316-4aa5-805f-f9c55657cfc8",
+ "diagramNodeId": "0aebc819-85e7-40ab-8cb2-f838a2ed0a9c",
+ "simStepLabel": "Dependency Data Sent to Snyk API",
+ "simStepDescription": "The CLI sends the generated dependency graph along with the requested SBOM format and organization ID to the Snyk API for processing.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts",
+ "startLine": "838",
+ "endLine": "838",
+ "relevantVariables": [
+ "app.post(`/rest/orgs/:orgId/sbom_tests`, (req, res) => {"
+ ]
+ },
+ "inputDataExample": "{\n \"schemaVersion\": \"1.2.0\",\n \"pkgManager\": {\n \"name\": \"npm\"\n },\n \"pkgs\": [\n {\n \"id\": \"my-app@1.0.0\",\n \"info\": {\n \"name\": \"my-app\",\n \"version\": \"1.0.0\"\n }\n },\n {\n \"id\": \"express@4.17.1\",\n \"info\": {\n \"name\": \"express\",\n \"version\": \"4.17.1\"\n }\n },\n {\n \"id\": \"accepts@1.3.7\",\n \"info\": {\n \"name\": \"accepts\",\n \"version\": \"1.3.7\"\n }\n }\n ],\n \"graph\": {\n \"rootNodeId\": \"root-node\",\n \"nodes\": [\n {\n \"nodeId\": \"root-node\",\n \"pkgId\": \"my-app@1.0.0\",\n \"deps\": [\n {\n \"nodeId\": \"express@4.17.1\"\n }\n ]\n },\n {\n \"nodeId\": \"express@4.17.1\",\n \"pkgId\": \"express@4.17.1\",\n \"deps\": [\n {\n \"nodeId\": \"accepts@1.3.7\"\n }\n ]\n },\n {\n \"nodeId\": \"accepts@1.3.7\",\n \"pkgId\": \"accepts@1.3.7\",\n \"deps\": []\n }\n ]\n }\n}",
+ "outputDataExample": "{\n \"schemaVersion\": \"1.2.0\",\n \"pkgManager\": {\n \"name\": \"npm\"\n },\n \"pkgs\": [\n {\n \"id\": \"my-app@1.0.0\",\n \"info\": {\n \"name\": \"my-app\",\n \"version\": \"1.0.0\"\n }\n },\n {\n \"id\": \"express@4.17.1\",\n \"info\": {\n \"name\": \"express\",\n \"version\": \"4.17.1\"\n }\n },\n {\n \"id\": \"accepts@1.3.7\",\n \"info\": {\n \"name\": \"accepts\",\n \"version\": \"1.3.7\"\n }\n }\n ],\n \"graph\": {\n \"rootNodeId\": \"root-node\",\n \"nodes\": [\n {\n \"nodeId\": \"root-node\",\n \"pkgId\": \"my-app@1.0.0\",\n \"deps\": [\n {\n \"nodeId\": \"express@4.17.1\"\n }\n ]\n },\n {\n \"nodeId\": \"express@4.17.1\",\n \"pkgId\": \"express@4.17.1\",\n \"deps\": [\n {\n \"nodeId\": \"accepts@1.3.7\"\n }\n ]\n },\n {\n \"nodeId\": \"accepts@1.3.7\",\n \"pkgId\": \"accepts@1.3.7\",\n \"deps\": []\n }\n ]\n }\n}"
+ },
+ {
+ "simStepId": "f671fc80-497a-4f02-aa7d-2268e86d8a04",
+ "diagramNodeId": "a0cfde3b-55f7-4796-995d-c4bb71a82047",
+ "simStepLabel": "Snyk API Generates SBOM Document",
+ "simStepDescription": "The Snyk backend service receives the dependency graph, processes it, and constructs the SBOM document in the requested format (e.g., CycloneDX or SPDX), populating component details, relationships, and metadata.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts",
+ "startLine": "986",
+ "endLine": "1032",
+ "relevantVariables": [
+ "switch (req.query.format)",
+ "case 'spdx2.3+json'",
+ "case 'cyclonedx1.4+json'",
+ "case 'cyclonedx1.5+json'",
+ "case 'cyclonedx1.6+json'",
+ "bom"
+ ]
+ },
+ "inputDataExample": "{\n \"sbom\": {\n \"bomFormat\": \"CycloneDX\"\n },\n \"depGraph\": {\n \"schemaVersion\": \"1.2.0\",\n \"pkgManager\": { \"name\": \"npm\" },\n \"pkgs\": [ { \"id\": \"my-app@1.0.0\" }, { \"id\": \"express@4.17.1\" } ],\n \"graph\": { \"rootNodeId\": \"root-node\" }\n }\n}",
+ "outputDataExample": "{\n \"$schema\": \"http://cyclonedx.org/schema/bom-1.6.schema.json\",\n \"bomFormat\": \"CycloneDX\",\n \"specVersion\": \"1.6\",\n \"serialNumber\": \"urn:uuid:123e4567-e89b-12d3-a456-426614174000\",\n \"version\": 1,\n \"metadata\": {\n \"timestamp\": \"2024-08-15T10:00:00Z\",\n \"tools\": {\n \"components\": [\n {\n \"type\": \"application\",\n \"author\": \"Snyk\",\n \"name\": \"snyk-cli\",\n \"version\": \"1.1299.0\"\n }\n ]\n },\n \"component\": {\n \"bom-ref\": \"my-app@1.0.0\",\n \"type\": \"application\",\n \"name\": \"my-app\",\n \"version\": \"1.0.0\",\n \"purl\": \"pkg:npm/my-app@1.0.0\"\n }\n },\n \"components\": [\n {\n \"bom-ref\": \"express@4.17.1\",\n \"type\": \"library\",\n \"name\": \"express\",\n \"version\": \"4.17.1\",\n \"purl\": \"pkg:npm/express@4.17.1\"\n },\n {\n \"bom-ref\": \"accepts@1.3.7\",\n \"type\": \"library\",\n \"name\": \"accepts\",\n \"version\": \"1.3.7\",\n \"purl\": \"pkg:npm/accepts@1.3.7\"\n }\n ],\n \"dependencies\": [\n {\n \"ref\": \"my-app@1.0.0\",\n \"dependsOn\": [\n \"express@4.17.1\"\n ]\n },\n {\n \"ref\": \"express@4.17.1\",\n \"dependsOn\": [\n \"accepts@1.3.7\"\n ]\n },\n {\n \"ref\": \"accepts@1.3.7\",\n \"dependsOn\": []\n }\n ]\n}"
+ },
+ {
+ "simStepId": "935d8cbe-5c95-4fbb-aa94-01907c955999",
+ "diagramNodeId": "1925d126-8d72-41a7-bdeb-f684048e2171",
+ "simStepLabel": "SBOM Document Returned to CLI",
+ "simStepDescription": "The Snyk API sends the complete SBOM document back to the CLI client as the body of the HTTP response.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts",
+ "startLine": "1045",
+ "endLine": "1045",
+ "relevantVariables": [
+ "res.send({ data: bom })"
+ ]
+ },
+ "inputDataExample": "{\n \"$schema\": \"http://cyclonedx.org/schema/bom-1.6.schema.json\",\n \"bomFormat\": \"CycloneDX\",\n \"specVersion\": \"1.6\",\n \"serialNumber\": \"urn:uuid:123e4567-e89b-12d3-a456-426614174000\",\n \"version\": 1,\n \"metadata\": {\n \"timestamp\": \"2024-08-15T10:00:00Z\",\n \"tools\": {\n \"components\": [\n {\n \"type\": \"application\",\n \"author\": \"Snyk\",\n \"name\": \"snyk-cli\",\n \"version\": \"1.1299.0\"\n }\n ]\n },\n \"component\": {\n \"bom-ref\": \"my-app@1.0.0\",\n \"type\": \"application\",\n \"name\": \"my-app\",\n \"version\": \"1.0.0\",\n \"purl\": \"pkg:npm/my-app@1.0.0\"\n }\n },\n \"components\": [\n {\n \"bom-ref\": \"express@4.17.1\",\n \"type\": \"library\",\n \"name\": \"express\",\n \"version\": \"4.17.1\",\n \"purl\": \"pkg:npm/express@4.17.1\"\n },\n {\n \"bom-ref\": \"accepts@1.3.7\",\n \"type\": \"library\",\n \"name\": \"accepts\",\n \"version\": \"1.3.7\",\n \"purl\": \"pkg:npm/accepts@1.3.7\"\n }\n ],\n \"dependencies\": [\n {\n \"ref\": \"my-app@1.0.0\",\n \"dependsOn\": [\n \"express@4.17.1\"\n ]\n },\n {\n \"ref\": \"express@4.17.1\",\n \"dependsOn\": [\n \"accepts@1.3.7\"\n ]\n },\n {\n \"ref\": \"accepts@1.3.7\",\n \"dependsOn\": []\n }\n ]\n}",
+ "outputDataExample": "{\n \"$schema\": \"http://cyclonedx.org/schema/bom-1.6.schema.json\",\n \"bomFormat\": \"CycloneDX\",\n \"specVersion\": \"1.6\",\n \"serialNumber\": \"urn:uuid:123e4567-e89b-12d3-a456-426614174000\",\n \"version\": 1,\n \"metadata\": {\n \"timestamp\": \"2024-08-15T10:00:00Z\",\n \"tools\": {\n \"components\": [\n {\n \"type\": \"application\",\n \"author\": \"Snyk\",\n \"name\": \"snyk-cli\",\n \"version\": \"1.1299.0\"\n }\n ]\n },\n \"component\": {\n \"bom-ref\": \"my-app@1.0.0\",\n \"type\": \"application\",\n \"name\": \"my-app\",\n \"version\": \"1.0.0\",\n \"purl\": \"pkg:npm/my-app@1.0.0\"\n }\n },\n \"components\": [\n {\n \"bom-ref\": \"express@4.17.1\",\n \"type\": \"library\",\n \"name\": \"express\",\n \"version\": \"4.17.1\",\n \"purl\": \"pkg:npm/express@4.17.1\"\n },\n {\n \"bom-ref\": \"accepts@1.3.7\",\n \"type\": \"library\",\n \"name\": \"accepts\",\n \"version\": \"1.3.7\",\n \"purl\": \"pkg:npm/accepts@1.3.7\"\n }\n ],\n \"dependencies\": [\n {\n \"ref\": \"my-app@1.0.0\",\n \"dependsOn\": [\n \"express@4.17.1\"\n ]\n },\n {\n \"ref\": \"express@4.17.1\",\n \"dependsOn\": [\n \"accepts@1.3.7\"\n ]\n },\n {\n \"ref\": \"accepts@1.3.7\",\n \"dependsOn\": []\n }\n ]\n}"
+ },
+ {
+ "simStepId": "da6075bd-7a85-4ca3-b85f-459cf4d7dc81",
+ "diagramNodeId": "fd60fa14-6a9b-4f02-8842-31194f713045",
+ "simStepLabel": "CLI Receives and Parses SBOM",
+ "simStepDescription": "The Snyk CLI receives the HTTP response from the API, extracts the raw SBOM document from the response body, and parses it into an in-memory object.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts",
+ "startLine": "53",
+ "endLine": "56",
+ "relevantVariables": [
+ "stdout",
+ "bom",
+ "JSON.parse"
+ ]
+ },
+ "inputDataExample": "{\n \"data\": {\n \"$schema\": \"http://cyclonedx.org/schema/bom-1.6.schema.json\",\n \"bomFormat\": \"CycloneDX\",\n \"specVersion\": \"1.6\",\n \"components\": []\n }\n}",
+ "outputDataExample": "{\n \"$schema\": \"http://cyclonedx.org/schema/bom-1.6.schema.json\",\n \"bomFormat\": \"CycloneDX\",\n \"specVersion\": \"1.6\",\n \"components\": []\n}"
+ },
+ {
+ "simStepId": "82ded9a2-d928-4676-98d2-123b4d7e18aa",
+ "diagramNodeId": "4ceea819-453f-46ca-9504-f7f7e7525095",
+ "simStepLabel": "SBOM Data Transmitted to Output Stream",
+ "simStepDescription": "The processed SBOM object is serialized into a string and transmitted to the appropriate output stream, either `stdout` for display in the terminal or a file stream if an output path is specified via `--json-file-output`.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts",
+ "startLine": "93",
+ "endLine": "99",
+ "relevantVariables": [
+ "runSnykCLI",
+ "--json-file-output"
+ ]
+ },
+ "inputDataExample": "{\n \"$schema\": \"http://cyclonedx.org/schema/bom-1.6.schema.json\",\n \"bomFormat\": \"CycloneDX\",\n \"specVersion\": \"1.6\",\n \"components\": []\n}",
+ "outputDataExample": "{\n \"$schema\": \"http://cyclonedx.org/schema/bom-1.6.schema.json\",\n \"bomFormat\": \"CycloneDX\",\n \"specVersion\": \"1.6\",\n \"components\": []\n}"
+ },
+ {
+ "simStepId": "f044fa90-9219-4a05-94db-836fca272120",
+ "diagramNodeId": "f33f5035-43b2-4f08-a48d-00f74a767f82",
+ "simStepLabel": "Final SBOM is Displayed or Saved",
+ "simStepDescription": "The final SBOM is either displayed in the user's terminal via standard output or saved to the specified file on disk, completing the process and providing the user with their Software Bill of Materials.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts",
+ "startLine": "101",
+ "endLine": "104",
+ "relevantVariables": [
+ "fs.readFileSync",
+ "bomFile",
+ "JSON.parse(bomFile)"
+ ]
+ },
+ "inputDataExample": "\"{ \\\"$schema\\\": \\\"http://cyclonedx.org/schema/bom-1.6.schema.json\\\", ... }\"",
+ "outputDataExample": "null"
+ }
+ ],
+ "description": "- This use case addresses the growing need for software supply chain transparency and compliance
- - A user runs
snyk sbom on their project - - The CLI analyzes the project's dependencies, similar to a
snyk test run - - It then generates a comprehensive list of all software components in a standard SBOM format, such as CycloneDX or SPDX
- - This SBOM can be used for compliance audits, asset management, and vulnerability tracking
",
+ "simulationNodesAndEdges": {
+ "f5274edb-f76d-406c-b9f5-b48eaff595ef": {
+ "simStepIds": [
+ "e5f0127f-0d5e-4cff-93d7-559a74ce558e"
+ ]
+ },
+ "83264e21-3db1-4eb0-8051-8edd66d6b78d": {
+ "simStepIds": [
+ "e169da2c-940a-4ce4-b955-43cccdc9a50b"
+ ]
+ },
+ "a0cfde3b-55f7-4796-995d-c4bb71a82047": {
+ "simStepIds": [
+ "f671fc80-497a-4f02-aa7d-2268e86d8a04"
+ ]
+ },
+ "fd60fa14-6a9b-4f02-8842-31194f713045": {
+ "simStepIds": [
+ "da6075bd-7a85-4ca3-b85f-459cf4d7dc81"
+ ]
+ },
+ "f33f5035-43b2-4f08-a48d-00f74a767f82": {
+ "simStepIds": [
+ "f044fa90-9219-4a05-94db-836fca272120"
+ ]
+ },
+ "20667550-4ae5-486b-8711-f032d1ab608e": {
+ "simStepIds": [
+ "2b2d61a1-4c9b-4c4e-b6d6-72f04ced24eb"
+ ]
+ },
+ "0aebc819-85e7-40ab-8cb2-f838a2ed0a9c": {
+ "simStepIds": [
+ "73b2957d-2316-4aa5-805f-f9c55657cfc8"
+ ]
+ },
+ "1925d126-8d72-41a7-bdeb-f684048e2171": {
+ "simStepIds": [
+ "935d8cbe-5c95-4fbb-aa94-01907c955999"
+ ]
+ },
+ "4ceea819-453f-46ca-9504-f7f7e7525095": {
+ "simStepIds": [
+ "82ded9a2-d928-4676-98d2-123b4d7e18aa"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "snyk sbom, cyclonedx, spdx",
+ "generationPrompt": "Generate a Software Bill of Materials (SBOM)",
+ "generationKeywords": "snyk sbom, cyclonedx, spdx"
+ },
+ "Generate machine-readable reports for CI/CD integration": {
+ "name": "Generate machine-readable reports for CI/CD integration",
+ "simSteps": [
+ {
+ "simStepId": "e7cd21df-d14a-4a0c-8a15-cfbadc5b7d39",
+ "diagramNodeId": "04752c41-0bf0-482f-8cce-3a89abba9b44",
+ "simStepLabel": "Parse and Validate CLI Arguments",
+ "simStepDescription": "The Snyk CLI is executed with command-line arguments. The `main.ts` entrypoint parses these arguments and invokes `validateCommand` to ensure the provided option combinations are supported. For instance, it verifies that `--json-file-output` is used with a supported command like 'test'.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/main.ts",
+ "startLine": "452",
+ "endLine": "456",
+ "relevantVariables": [
+ "args",
+ "validateCommand"
+ ]
+ },
+ "inputDataExample": "{\"argv\": [\"node\", \"snyk\", \"test\", \"--json-file-output=results.json\"]}",
+ "outputDataExample": "{\"command\": \"test\", \"options\": {\"json-file-output\": \"results.json\"}}"
+ },
+ {
+ "simStepId": "705c5c99-7b5c-4dfa-8307-1d80c71c4fc0",
+ "diagramNodeId": "9d310562-b441-41d6-a9a8-61adaa8e602c",
+ "simStepLabel": "Pass Options to Command Handler",
+ "simStepDescription": "The parsed and validated arguments, including the output formatting options, are passed from the main CLI handler to the specific command's execution logic (e.g., the 'test' command).",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/main.ts",
+ "startLine": "83",
+ "endLine": "87",
+ "relevantVariables": [
+ "args.options"
+ ]
+ },
+ "inputDataExample": "{\"command\": \"test\", \"options\": {\"json-file-output\": \"results.json\"}}",
+ "outputDataExample": "{\"command\": \"test\", \"options\": {\"json-file-output\": \"results.json\"}}"
+ },
+ {
+ "simStepId": "58f1dcbe-41e0-4f29-bb87-253c6f14ffa0",
+ "diagramNodeId": "498c33dc-49df-4015-bace-3cfd51ddbd44",
+ "simStepLabel": "Format Scan Results",
+ "simStepDescription": "After the scan completes, the raw results are processed by `formatTestResults`. Based on the presence of `--json` or `--json-file-output` flags in the options, this function serializes the result data into a JSON string using `jsonStringifyLargeObject`.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts",
+ "startLine": "116",
+ "endLine": "118",
+ "relevantVariables": [
+ "options",
+ "jsonData",
+ "stringifiedJsonData",
+ "jsonStringifyLargeObject"
+ ]
+ },
+ "inputDataExample": "{\"mappedResults\": [{\"vulnerabilities\": [{\"id\": \"SNYK-JS-LODASH-12345\"}], \"ok\": false}], \"options\": {\"json-file-output\": \"results.json\"}}",
+ "outputDataExample": "{\"stringifiedJsonData\": \"{\\\"vulnerabilities\\\":[{\\\"id\\\":\\\"SNYK-JS-LODASH-12345\\\"}],\\\"ok\\\":false}\", \"stringifiedSarifData\": \"\"}"
+ },
+ {
+ "simStepId": "3226af83-a2f7-4aa8-b9fc-9250a63a0c20",
+ "diagramNodeId": "64fa27e1-0d36-45c3-80d7-6db373bc6736",
+ "simStepLabel": "Package Formatted Results",
+ "simStepDescription": "The stringified JSON and SARIF data are encapsulated into a `TestCommandResult` object. This provides a standardized container for passing different result formats back to the main CLI controller.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/commands/types.ts",
+ "startLine": "70",
+ "endLine": "83",
+ "relevantVariables": [
+ "TestCommandResult",
+ "jsonResult",
+ "sarifResult",
+ "jsonData"
+ ]
+ },
+ "inputDataExample": "{\"jsonResult\": \"{\\\"vulnerabilities\\\":[],\\\"ok\\\":true}\", \"sarifResult\": \"\", \"jsonData\": {}}",
+ "outputDataExample": "{\"jsonResult\": \"{\\\"vulnerabilities\\\":[],\\\"ok\\\":true}\", \"sarifResult\": \"\", \"jsonData\": {}}"
+ },
+ {
+ "simStepId": "f37c67d6-73f0-41c2-9f61-241dad33c1da",
+ "diagramNodeId": "250f5cc5-58f7-47e0-b6e0-eba4e8fdbb43",
+ "simStepLabel": "Process and Dispatch Command Result",
+ "simStepDescription": "The main CLI function receives the `TestCommandResult`. It extracts the stringified JSON and SARIF results and calls `saveResultsToFile` for both formats. This function acts as a dispatcher, determining if a file needs to be written based on the user's options.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/main.ts",
+ "startLine": "83",
+ "endLine": "87",
+ "relevantVariables": [
+ "commandResult",
+ "saveResultsToFile",
+ "jsonResults",
+ "sarifResults",
+ "jsonPayload"
+ ]
+ },
+ "inputDataExample": "{\"commandResult\": {\"getJsonResult\": \"() => '{\\\\\"ok\\\\\": true}'\", \"getSarifResult\": \"() => ''\", \"getJsonData\": \"() => {}\"}}",
+ "outputDataExample": "{\"status\": \"Invoking saveResultsToFile for json and sarif formats\"}"
+ },
+ {
+ "simStepId": "c3e2b026-20c8-4c0a-b008-095abca52d74",
+ "diagramNodeId": "18235737-3e12-4898-be1b-250a039ccf85",
+ "simStepLabel": "Transmit Data to File Writer",
+ "simStepDescription": "`saveResultsToFile` is called with the output type ('json' or 'sarif') and the corresponding data. It retrieves the target filename from the options and passes the necessary information to the underlying file-saving function, `saveJsonToFile`.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/main.ts",
+ "startLine": "480",
+ "endLine": "494",
+ "relevantVariables": [
+ "saveResultsToFile",
+ "saveJsonToFile",
+ "jsonResults",
+ "jsonPayload"
+ ]
+ },
+ "inputDataExample": "{\"type\": \"json\", \"outputFile\": \"results.json\", \"jsonResults\": \"{\\\"vulnerabilities\\\":[{\\\"id\\\":\\\"SNYK-JS-LODASH-590103\\\"}],\\\"ok\\\":false}\"}",
+ "outputDataExample": "{\"type\": \"json\", \"outputFile\": \"results.json\", \"jsonResults\": \"{\\\"vulnerabilities\\\":[{\\\"id\\\":\\\"SNYK-JS-LODASH-590103\\\"}],\\\"ok\\\":false}\"}"
+ },
+ {
+ "simStepId": "e12b444d-aecf-4f5b-840d-f71e82e84bf3",
+ "diagramNodeId": "a2fda714-66da-4da2-bec7-56912f90a421",
+ "simStepLabel": "Write Report to File",
+ "simStepDescription": "The `saveJsonToFile` function receives the final filename and the stringified JSON content. If the content is not empty, it uses file system operations to write the string to the specified file, creating the machine-readable report.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/cli/main.ts",
+ "startLine": "241",
+ "endLine": "267",
+ "relevantVariables": [
+ "saveJsonToFile",
+ "jsonOutputFile",
+ "jsonPayload",
+ "stringifiedJson",
+ "saveObjectToFile"
+ ]
+ },
+ "inputDataExample": "{\"jsonOutputFile\": \"results.json\", \"stringifiedJson\": \"{\\\"vulnerabilities\\\":[{\\\"id\\\":\\\"SNYK-JS-LODASH-590103\\\",\\\"title\\\":\\\"Prototype Pollution\\\"}],\\\"ok\\\":false,\\\"dependencyCount\\\":250}\"}",
+ "outputDataExample": "null"
+ }
+ ],
+ "description": "- This is essential for integrating Snyk scans into automated pipelines and developer tools
- - A user adds an option like
--json, --sarif, or --json-file-output= to a scan command (e - g
- ,
snyk test --json) - - Instead of human-readable text, the CLI outputs the scan results in a structured format (JSON or SARIF)
- - This structured output can be easily parsed by CI/CD systems to make pass/fail decisions, ingested by other security tools, or used to display results in IDEs and code review platforms
",
+ "simulationNodesAndEdges": {
+ "04752c41-0bf0-482f-8cce-3a89abba9b44": {
+ "simStepIds": [
+ "e7cd21df-d14a-4a0c-8a15-cfbadc5b7d39"
+ ]
+ },
+ "498c33dc-49df-4015-bace-3cfd51ddbd44": {
+ "simStepIds": [
+ "58f1dcbe-41e0-4f29-bb87-253c6f14ffa0"
+ ]
+ },
+ "250f5cc5-58f7-47e0-b6e0-eba4e8fdbb43": {
+ "simStepIds": [
+ "f37c67d6-73f0-41c2-9f61-241dad33c1da"
+ ]
+ },
+ "a2fda714-66da-4da2-bec7-56912f90a421": {
+ "simStepIds": [
+ "e12b444d-aecf-4f5b-840d-f71e82e84bf3"
+ ]
+ },
+ "9d310562-b441-41d6-a9a8-61adaa8e602c": {
+ "simStepIds": [
+ "705c5c99-7b5c-4dfa-8307-1d80c71c4fc0"
+ ]
+ },
+ "64fa27e1-0d36-45c3-80d7-6db373bc6736": {
+ "simStepIds": [
+ "3226af83-a2f7-4aa8-b9fc-9250a63a0c20"
+ ]
+ },
+ "18235737-3e12-4898-be1b-250a039ccf85": {
+ "simStepIds": [
+ "c3e2b026-20c8-4c0a-b008-095abca52d74"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": "sarif, json, json-file-output",
+ "generationPrompt": "Generate machine-readable reports for CI/CD integration",
+ "generationKeywords": "sarif, json, json-file-output"
+ },
+ "Customize scan behavior with security policies": {
+ "name": "Customize scan behavior with security policies",
+ "simSteps": [
+ {
+ "simStepId": "75f10feb-80fe-4a6c-8622-902f5cd7d812",
+ "diagramNodeId": "b872abf0-9951-4faf-9d16-8ebcdf7dea58",
+ "simStepLabel": "Policy Discovery: Locate and Load .snyk File",
+ "simStepDescription": "When a scan command like `snyk test` is initiated, the CLI first searches for a `.snyk` policy file. The `findAndLoadPolicy` function orchestrates this by checking for a path specified via the `--policy-path` option, or otherwise looking in the project's root directory. It then uses the `snyk-policy` library to read and parse the YAML file into a structured policy object.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts",
+ "startLine": "14",
+ "endLine": "54",
+ "relevantVariables": [
+ "findAndLoadPolicy",
+ "policyLocations",
+ "snykPolicyLib.load"
+ ]
+ },
+ "inputDataExample": "{\n \"root\": \"/path/to/my-project\",\n \"scannedProjectFolder\": \"/path/to/my-project\",\n \"options\": {\n \"policy-path\": null\n }\n}",
+ "outputDataExample": "{\n \"version\": \"v1.25.0\",\n \"ignore\": {\n \"SNYK-JS-LODASH-450202\": [\n {\n \"*\": {\n \"reason\": \"No fix available for this transitive dependency\",\n \"expires\": \"2025-01-01T00:00:00.000Z\"\n }\n }\n ]\n },\n \"patch\": {},\n \"__filename\": \"/path/to/my-project/.snyk\"\n}"
+ },
+ {
+ "simStepId": "31d0b0f0-0b46-4709-994a-3ab86171d54e",
+ "diagramNodeId": "a08ccc2e-befb-46ae-833d-abdc919216a5",
+ "simStepLabel": "Data Transmission: Pass Policy to Test Runner",
+ "simStepDescription": "The parsed policy object is passed from the loading utility to the main test execution logic. The test runner will then use this policy object to prepare the API request.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts",
+ "startLine": "764",
+ "endLine": "768",
+ "relevantVariables": [
+ "policy",
+ "findAndLoadPolicy"
+ ]
+ },
+ "inputDataExample": "{\n \"version\": \"v1.25.0\",\n \"ignore\": {\n \"SNYK-JS-LODASH-450202\": [\n {\n \"*\": {\n \"reason\": \"No fix available for this transitive dependency\",\n \"expires\": \"2025-01-01T00:00:00.000Z\"\n }\n }\n ]\n },\n \"patch\": {},\n \"__filename\": \"/path/to/my-project/.snyk\"\n}",
+ "outputDataExample": "{\n \"version\": \"v1.25.0\",\n \"ignore\": {\n \"SNYK-JS-LODASH-450202\": [\n {\n \"*\": {\n \"reason\": \"No fix available for this transitive dependency\",\n \"expires\": \"2025-01-01T00:00:00.000Z\"\n }\n }\n ]\n },\n \"patch\": {},\n \"__filename\": \"/path/to/my-project/.snyk\"\n}"
+ },
+ {
+ "simStepId": "cf4028f1-9fdf-43d6-b653-4429a498c884",
+ "diagramNodeId": "687c1238-f8cd-46b1-9f08-8dd609866724",
+ "simStepLabel": "API Payload Preparation: Attach Policy to Request",
+ "simStepDescription": "Before sending the project's dependency data to the Snyk API, the CLI serializes the loaded policy object back into a string and includes it in the API request payload. This informs the Snyk backend of the local ignore rules during the analysis.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts",
+ "startLine": "824",
+ "endLine": "824",
+ "relevantVariables": [
+ "policy",
+ "payloadBody"
+ ]
+ },
+ "inputDataExample": "{\n \"version\": \"v1.25.0\",\n \"ignore\": {\n \"SNYK-JS-LODASH-450202\": [\n {\n \"*\": {\n \"reason\": \"No fix available for this transitive dependency\",\n \"expires\": \"2025-01-01T00:00:00.000Z\"\n }\n }\n ]\n },\n \"patch\": {}\n}",
+ "outputDataExample": "{\n \"depGraph\": \"...\",\n \"policy\": \"# Snyk policy file...\\nversion: v1.25.0\\nignore:\\n SNYK-JS-LODASH-450202:\\n - '*':\\n reason: No fix available for this transitive dependency\\n expires: 2025-01-01T00:00:00.000Z\\n\"\n}"
+ },
+ {
+ "simStepId": "7b1d9946-136c-468b-b75d-15e4b65cf46d",
+ "diagramNodeId": "1f236d2c-b624-4f63-a48f-493622977624",
+ "simStepLabel": "API Communication: Receive Scan Results",
+ "simStepDescription": "The Snyk API processes the dependency information and returns a comprehensive scan result. This response includes the list of all found vulnerabilities and also echoes back the policy string that was originally sent in the request.",
+ "isEdge": 1,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts",
+ "startLine": "470",
+ "endLine": "470",
+ "relevantVariables": [
+ "res",
+ "api",
+ "payload"
+ ]
+ },
+ "inputDataExample": "{\n \"vulnerabilities\": [\n { \"id\": \"SNYK-JS-LODASH-450202\", \"packageName\": \"lodash\", \"severity\": \"high\", \"from\": [\"my-app@1.0.0\", \"lodash@4.17.15\"] },\n { \"id\": \"SNYK-JS-EXPRESS-56789\", \"packageName\": \"express\", \"severity\": \"medium\", \"from\": [\"my-app@1.0.0\", \"express@4.17.1\"] }\n ],\n \"ok\": false,\n \"dependencyCount\": 150,\n \"policy\": \"# Snyk policy file...\\nversion: v1.25.0\\nignore:\\n SNYK-JS-LODASH-450202:\\n - '*':\\n reason: No fix available for this transitive dependency\\n expires: 2025-01-01T00:00:00.000Z\\n\"\n}",
+ "outputDataExample": "{\n \"vulnerabilities\": [\n { \"id\": \"SNYK-JS-LODASH-450202\", \"packageName\": \"lodash\", \"severity\": \"high\", \"from\": [\"my-app@1.0.0\", \"lodash@4.17.15\"] },\n { \"id\": \"SNYK-JS-EXPRESS-56789\", \"packageName\": \"express\", \"severity\": \"medium\", \"from\": [\"my-app@1.0.0\", \"express@4.17.1\"] }\n ],\n \"ok\": false,\n \"dependencyCount\": 150,\n \"policy\": \"# Snyk policy file...\\nversion: v1.25.0\\nignore:\\n SNYK-JS-LODASH-450202:\\n - '*':\\n reason: No fix available for this transitive dependency\\n expires: 2025-01-01T00:00:00.000Z\\n\"\n}"
+ },
+ {
+ "simStepId": "5a85d419-6e13-494a-98ad-93ec19bbd313",
+ "diagramNodeId": "a772fd68-6c56-4a80-bd7d-baeecf733f5d",
+ "simStepLabel": "Policy Application: Filter Vulnerabilities Locally",
+ "simStepDescription": "After receiving the API response, the CLI performs a final client-side filtering step unless `--ignore-policy` is used. It re-parses the policy string from the response using `snykPolicy.loadFromText` and then calls the `policy.filter()` method. This method iterates through the vulnerabilities and removes any that match the `ignore` rules, thereby suppressing them from the final report.",
+ "isEdge": 0,
+ "sourceCodeMapping": {
+ "filePath": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts",
+ "startLine": "480",
+ "endLine": "484",
+ "relevantVariables": [
+ "options['ignore-policy']",
+ "snykPolicy.loadFromText",
+ "policy.filter",
+ "res"
+ ]
+ },
+ "inputDataExample": "{\n \"vulnerabilities\": [\n { \"id\": \"SNYK-JS-LODASH-450202\", \"packageName\": \"lodash\", \"severity\": \"high\", \"from\": [\"my-app@1.0.0\", \"lodash@4.17.15\"] },\n { \"id\": \"SNYK-JS-EXPRESS-56789\", \"packageName\": \"express\", \"severity\": \"medium\", \"from\": [\"my-app@1.0.0\", \"express@4.17.1\"] }\n ],\n \"ok\": false,\n \"policy\": \"...\"\n}",
+ "outputDataExample": "{\n \"vulnerabilities\": [\n { \"id\": \"SNYK-JS-EXPRESS-56789\", \"packageName\": \"express\", \"severity\": \"medium\", \"from\": [\"my-app@1.0.0\", \"express@4.17.1\"] }\n ],\n \"ok\": false,\n \"policy\": \"...\",\n \"summary\": \"1 vulnerabilities found\",\n \"ignoreCount\": 1\n}"
+ }
+ ],
+ "description": "- This feature provides teams and organizations with the flexibility to manage and prioritize security findings at scale
- - A user creates a
- snyk file in their project's root directory
- - Within this file, they can define rules to ignore specific vulnerabilities by their ID, path, or set an expiration date for the ignore rule
- - When a scan is run, the CLI reads this policy file and automatically suppresses any matching vulnerabilities from the results
- - This allows teams to officially accept certain risks or temporarily ignore issues while they are being addressed, reducing noise and focusing on high-priority fixes
",
+ "simulationNodesAndEdges": {
+ "b872abf0-9951-4faf-9d16-8ebcdf7dea58": {
+ "simStepIds": [
+ "75f10feb-80fe-4a6c-8622-902f5cd7d812"
+ ]
+ },
+ "687c1238-f8cd-46b1-9f08-8dd609866724": {
+ "simStepIds": [
+ "cf4028f1-9fdf-43d6-b653-4429a498c884"
+ ]
+ },
+ "a772fd68-6c56-4a80-bd7d-baeecf733f5d": {
+ "simStepIds": [
+ "5a85d419-6e13-494a-98ad-93ec19bbd313"
+ ]
+ },
+ "a08ccc2e-befb-46ae-833d-abdc919216a5": {
+ "simStepIds": [
+ "31d0b0f0-0b46-4709-994a-3ab86171d54e"
+ ]
+ },
+ "1f236d2c-b624-4f63-a48f-493622977624": {
+ "simStepIds": [
+ "7b1d9946-136c-468b-b75d-15e4b65cf46d"
+ ]
+ }
+ },
+ "isAIGenerated": true,
+ "keywords": ".snyk, policy, ignore-policy",
+ "generationPrompt": "Customize scan behavior with security policies",
+ "generationKeywords": ".snyk, policy, ignore-policy"
+ }
+ },
+ "cellToPath": {
+ "bfd50998-1830-423a-8f91-f0844b925fe1": "src",
+ "a82fc320-1ca5-408c-b8e1-598c2b1271e0": "src/cli",
+ "41d2a457-f55a-4008-b20c-d732466c69ac": "src/lib",
+ "2ab7344b-9b11-4740-9ac2-653e69710c81": "src/cli/index.ts",
+ "7b10594e-b24a-4584-a846-cbd86e3bfdbd": "src/cli/args.ts",
+ "7e45be32-f81c-4968-bfbe-7d29120ae0ca": "src/cli/commands",
+ "0d44f382-7f12-4d1a-a845-6414b66ff034": "src/lib/snyk-test",
+ "4284ceb3-32e6-4844-b503-52766f741796": "src/lib/plugins",
+ "67a81d32-b0df-4d2d-9b0a-c5ddf39e0924": "src/lib/formatters",
+ "fd64c304-c3bd-4b9f-8b53-f8519e086d3e": "src/cli/commands/test",
+ "9a41c7a7-4333-418d-b6fd-9f73bebda86f": "src/lib/snyk-test/legacy.ts",
+ "fbcc93cc-edb3-41be-8008-34cf45f26d61": "src/lib/snyk-test/run-test.ts",
+ "9218c0a9-bf3d-4683-936c-5c2b95e0f080": "src/lib/plugins/index.ts",
+ "0d1d4f47-8e96-42cc-8dae-d2fddfd10726": "src/lib/formatters/test",
+ "d6e84c3c-2b69-42d8-a59b-af74ff80fa56": "src/cli/commands/test/index.ts",
+ "068b08fa-d016-455a-97e3-659677e90bd8": "src/lib/formatters/test/display-result.ts",
+ "cd9c671a-2673-44bb-af50-6d363f4c8e96": "src/cli/index.ts-simstep-33e58eb3-d814-420e-8b30-6193facab1eb",
+ "3c999446-05f8-4cee-9b80-054fa65cdef0": "src/cli/commands/test/index.ts-simstep-50b3698d-b5c8-419c-a9d7-7f8a1eff33d5",
+ "13d92073-022e-4f7c-bcbb-aebdda685f95": "src/lib/plugins/index.ts-simstep-be1c90e1-fd80-4037-980c-d28be03398b6",
+ "12922438-a1a3-4615-be47-ce6af952ebe1": "src/lib/snyk-test/run-test.ts-simstep-ff3a68d1-f59b-4605-9003-fa083a8db7e5",
+ "c717e177-bddb-4352-8a9e-5a03bcb666ef": "src/lib/formatters/test/display-result.ts-simstep-f7c6a307-dea6-4edc-b753-c64875aa9384",
+ "d1709c7d-bb03-47ec-9825-cdb64b39b6d0": "src/cli/index.ts-simstep-13bd281a-d9bb-44ad-a014-b5f51f76aa80",
+ "bb823e65-fbfd-4b67-92cb-5c30c3b14e63": "generated-edge-simstep-ab2cfd18-b8a9-40b6-938c-a2e83f754024-bb823e65-fbfd-4b67-92cb-5c30c3b14e63",
+ "6e5909fc-2d5e-4bcd-a631-2f92b6604e96": "generated-edge-simstep-aea45172-6cbe-4f27-8c31-f6c2656c1012-6e5909fc-2d5e-4bcd-a631-2f92b6604e96",
+ "ef86b2bd-4849-4d8e-a38a-faeb68cff554": "generated-edge-simstep-aa16da24-1280-4114-9a41-cb469e2911dc-ef86b2bd-4849-4d8e-a38a-faeb68cff554",
+ "4084b9c6-e000-4317-bfb8-b7b4eb72f979": "generated-edge-simstep-d10fb181-5500-45a0-85b1-50040a07a97f-4084b9c6-e000-4317-bfb8-b7b4eb72f979",
+ "e9f0e552-cd4a-4e87-9aef-5732c9ceb8da": "generated-edge-simstep-7874c48f-39d8-460e-9179-6a4082441eb0-e9f0e552-cd4a-4e87-9aef-5732c9ceb8da",
+ "50fba5a7-be9e-4088-95d8-acf055b8f600": "src/lib/plugins/sast",
+ "35fa9e2c-f148-4a40-ab2d-d4f2745dd68b": "src/lib/plugins/sast/index.ts",
+ "e88475f8-7204-4e16-a443-54617e08dd29": "src/lib/plugins/sast/settings.ts",
+ "9cee7e4e-4e60-4934-9b0a-eee48665dc9a": "src/lib/plugins/sast/checks.ts",
+ "a0484c96-2ffe-4b58-a41b-210662c289ec": "src/lib/plugins/sast/analysis.ts",
+ "85df9d5a-33e1-413b-ac31-8e6eda9f5517": "src/lib/plugins/sast/index.ts-simstep-c8c7ee4e-8f17-4c1b-b813-d7f6d360e219",
+ "87fdb414-03a7-4944-9350-b2227ddf3890": "src/lib/plugins/sast/settings.ts-simstep-c6491e83-01e8-4cbe-b2b6-b7e276d682b0",
+ "8c73f142-d7e2-4413-a7e0-8eaa979d3af2": "src/lib/plugins/sast/settings.ts-simstep-1cc334ad-bea1-456c-bbba-909a81ae0d19",
+ "04fe7483-0b7f-4d85-8c8c-d9a366db2cbf": "src/lib/plugins/sast/analysis.ts-simstep-dfab11fd-cca1-4915-9d98-c2d75f2de052",
+ "cb76c7a9-4204-4740-97ca-ecc0c0a0a792": "src/lib/plugins/sast/analysis.ts-simstep-1b157776-e26a-436c-b8be-beac0236b64e",
+ "18f7762c-2b2c-4bab-94a2-54e30c2e4e76": "src/lib/plugins/sast/index.ts-simstep-f74a6059-bcdc-4780-ab4c-769a3d998f2b",
+ "177732a8-44c1-43c8-9aea-0ad57b01bcb4": "generated-edge-simstep-63237123-ae0f-470f-96d6-3b052b9cd0f6-177732a8-44c1-43c8-9aea-0ad57b01bcb4",
+ "2bbd35f8-485b-4ceb-aefe-1772e697769f": "generated-edge-simstep-7b420e67-b6ce-47b5-8b6f-038e61ed41e0-2bbd35f8-485b-4ceb-aefe-1772e697769f",
+ "a35395a4-8e8f-4da5-8359-e81bae502f3f": "generated-edge-simstep-e8e623c6-5a0c-4866-96c6-b47b3809f178-a35395a4-8e8f-4da5-8359-e81bae502f3f",
+ "a1226a0a-2e74-4cf3-985a-fdfa0d24ed97": "generated-edge-simstep-b0f4807f-8f39-44a3-9c8b-993baf55461b-a1226a0a-2e74-4cf3-985a-fdfa0d24ed97",
+ "951b1618-6ff4-4130-9f0f-e269ca8e4157": "generated-edge-simstep-c1fac049-da64-4866-a03a-6e9146b341a2-951b1618-6ff4-4130-9f0f-e269ca8e4157",
+ "ab974bc6-ca88-45c9-8636-80e7b4a5030f": "src/lib/ecosystems",
+ "ce22a7aa-f9c5-4b6b-ad6f-8e90757ec83a": "src/lib/monitor",
+ "865fb20e-d26a-406b-9f19-9767d9f3234b": "src/lib/request",
+ "6639eeef-9194-4245-b9de-bb192b75d570": "src/cli/commands/monitor",
+ "9c6c0334-4bb3-4ed9-9c29-e9973dddb165": "src/lib/ecosystems/monitor.ts",
+ "9948c60b-5daa-47a7-ad88-9c3794596bd9": "src/lib/monitor/index.ts",
+ "bf9c39ae-73d3-440c-9f52-9b084099d09d": "src/lib/request/promise.ts",
+ "d62c84cb-9c2b-4738-9edc-2dce8a3941fb": "src/lib/formatters/format-monitor-response.ts",
+ "129e820f-d9fc-4629-8f71-ab98afacd790": "src/cli/commands/monitor/index.ts",
+ "8fe34504-b3ce-431c-9ced-38245c77cfc3": "src/cli/commands/monitor/index.ts-simstep-8e548081-e285-47ef-85d6-4c08853749af",
+ "d82ce01e-7a3d-4a59-92af-163333afbe4d": "src/cli/commands/monitor/index.ts-simstep-b5623c1f-924f-4354-8f6c-df35c322664a",
+ "9b0f24f6-1620-4ac6-9d9e-855fef646f5d": "src/lib/ecosystems/monitor.ts-simstep-af23c831-dab9-4d0a-8c29-b9d8a4015949",
+ "c199f3ac-935a-40f2-8343-2fe978313083": "src/lib/monitor/index.ts-simstep-eaff140f-6c07-403b-bc5c-d97849b3cafe",
+ "a61594f2-05b5-45b3-b9d9-6a0ea230d609": "src/lib/formatters/format-monitor-response.ts-simstep-6062ce68-9179-4264-91df-59ba447d3e89",
+ "807988de-deab-4338-8094-1db81b930e69": "generated-edge-simstep-4d2ddc8d-56e1-4eea-b450-1e68aae83020-807988de-deab-4338-8094-1db81b930e69",
+ "d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e": "generated-edge-simstep-c1b18c29-d707-44ea-ad10-0fe16ce8be25-d2b6333f-dcfd-4a4c-bd1f-e2b2ef00cc7e",
+ "a1d58d6c-4fa1-430e-aca9-8f02d067abad": "generated-edge-simstep-6f80a0a6-5228-42ae-b48d-6c0b71e42af9-a1d58d6c-4fa1-430e-aca9-8f02d067abad",
+ "64d2e920-3c82-4a3d-ba11-d479500941f5": "generated-edge-simstep-e1d5c936-b095-45da-b257-fd1f5e52af44-64d2e920-3c82-4a3d-ba11-d479500941f5",
+ "4fb5aa03-806c-47d2-a809-54ed8897ebe1": "snyk-cli-b8d7f01",
+ "85cfde81-a717-45ef-8a87-7933eb33aaa4": "snyk-cli-b8d7f01/src",
+ "08891fdc-0659-4fd0-b625-e59f5f616ade": "snyk-cli-b8d7f01/packages",
+ "35b595f8-07a0-4381-8583-2864f74392cb": "snyk-cli-b8d7f01/src/cli",
+ "34fe8c31-16e2-49f9-90c4-8c441c030adf": "snyk-cli-b8d7f01/packages/snyk-fix",
+ "53827863-cec6-4af5-a0c9-b4e71516e392": "snyk-cli-b8d7f01/src/cli/commands",
+ "59e69954-918d-4917-bc2d-23e6829dc151": "snyk-cli-b8d7f01/packages/snyk-fix/src",
+ "1bd31dba-e628-45c2-b14d-ba7136d9fbc1": "snyk-cli-b8d7f01/src/cli/commands/fix",
+ "4c3e5d19-448e-4a7a-81ec-1ec31b8abd86": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts",
+ "86eb6b76-13a5-47cf-97ae-5d3bcceea9bc": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins",
+ "9626e7a5-6521-4559-8b06-8fcc65641afe": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib",
+ "0ad50987-c84c-4ac4-97c6-f63728ed3520": "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts",
+ "58c1e862-ffc7-4a03-8a44-e607d59662db": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts",
+ "a4f86384-1372-48c7-b952-39891002f67e": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts",
+ "62c7871e-53a6-49eb-9bf9-417a92c06e17": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python",
+ "1984c9cc-b2ee-440a-8935-d0208207f4cc": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters",
+ "21cb1ec8-b5c9-4be8-a30a-430e85371b2a": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/index.ts",
+ "325dda18-c554-4a57-b6dc-7dd262382f93": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers",
+ "bc7bd2a2-93a3-4672-9b1d-966a0898cb62": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts",
+ "0f465fbf-3267-4774-9abf-c1b748d9552a": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements",
+ "88671fb5-68ef-4480-9cd9-e901d9d57f4a": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts",
+ "49e8d2e5-66a9-4da4-8dd6-29c384c4e617": "snyk-cli-b8d7f01/src/cli/commands/fix/validate-fix-command-is-supported.ts-simstep-574dabd8-20ff-4005-bc6e-2b5c32e69c51",
+ "faaedbc4-41ce-4a24-a3c3-f1ba22372a33": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts-simstep-73da6b68-0a68-4c57-8933-f8fa56819537",
+ "018b111a-f6be-49f3-99e0-83ed5baf6097": "snyk-cli-b8d7f01/packages/snyk-fix/src/index.ts-simstep-e3655bbf-11b4-4582-8454-2ee3da1bfda1",
+ "bc55c7f8-629c-4721-9afc-2c3f61ae5528": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/load-plugin.ts-simstep-56eb6e35-443f-4a6c-8652-3440950fda43",
+ "5025a11b-ad74-43be-8412-41019cd2b517": "snyk-cli-b8d7f01/packages/snyk-fix/src/plugins/python/handlers/pip-requirements/index.ts-simstep-2f0287d8-5b84-4ea8-8592-a8bcac01e1d7",
+ "b09b8c9b-af43-4757-9b7f-c479c2d39cbd": "snyk-cli-b8d7f01/packages/snyk-fix/src/lib/output-formatters/show-results-summary.ts-simstep-d93d1e26-1f42-4436-b8bd-871ef289ebaa",
+ "3082770f-9af1-4edf-b6ce-7c1011a37030": "snyk-cli-b8d7f01/src/cli/commands/fix/index.ts-simstep-d86c37d2-95f9-40ce-aa4e-626595032e96",
+ "5f83b817-b895-4237-8c3c-64703a0aaa0b": "generated-edge-simstep-ec0fd951-34ae-4ac7-a3d0-f110f3fc869a-5f83b817-b895-4237-8c3c-64703a0aaa0b",
+ "b235583a-957b-41e0-b5e8-4e4ff4c02198": "generated-edge-simstep-00d221b5-1fbe-48d5-bb0b-dac917d76b76-b235583a-957b-41e0-b5e8-4e4ff4c02198",
+ "92c113ad-5fc9-40c8-a1a5-9ee559639783": "generated-edge-simstep-e2a7e0a1-9d99-4f16-ae1e-38050efcc40f-92c113ad-5fc9-40c8-a1a5-9ee559639783",
+ "9f186d49-1651-4bc8-bf03-e52f6f5f0308": "generated-edge-simstep-1a7306ec-1588-4a84-8317-aa2c1fef3358-9f186d49-1651-4bc8-bf03-e52f6f5f0308",
+ "28407214-e4ff-4556-96be-b831fdcba4dd": "generated-edge-simstep-9d10714d-6924-4353-a0d2-c89e006821b9-28407214-e4ff-4556-96be-b831fdcba4dd",
+ "39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077": "generated-edge-simstep-8c1875f0-728a-49ae-a31b-6d4bc8c94673-39f8c5e5-bcbf-4b06-a937-d9d1a2ff7077",
+ "642b90fd-b953-4d96-94af-68ff69427e75": "src/lib/snyk-test/assemble-payloads.ts",
+ "00667f37-a3a9-468d-8372-1d2395fe3133": "src/lib/ecosystems/plugins.ts",
+ "17dee647-c7e6-4342-8c36-e73289cf6d7c": "src/cli/commands/test/index.ts-simstep-587a712f-f06c-4356-9789-ecfbe1f45384",
+ "950404fa-f4bb-4054-9691-5ad1fa8a51d7": "src/lib/snyk-test/run-test.ts-simstep-7c6a3c19-c15b-4314-bc8e-c95d466b9df8",
+ "67b965d1-eb5f-4758-af6b-eb5194ddb55a": "src/lib/ecosystems/plugins.ts-simstep-e31e64c1-4eda-4e2c-92c8-309ed2c01e7c",
+ "32359976-69b4-481a-acec-c87e0a8adc54": "src/lib/snyk-test/run-test.ts-simstep-95d173c1-33b2-404b-b876-d38f5c6b6eb7",
+ "7ce21ea9-90c1-4e12-9e5c-beba8eb2f732": "src/lib/snyk-test/run-test.ts-simstep-ec2ecf88-bea3-44f8-a9b2-3d9cbc4614cb",
+ "9c44a528-5124-4af7-942f-de5a8bcef05b": "src/lib/formatters/test/display-result.ts-simstep-3e878605-ffbe-4b24-8218-68814b7d1386",
+ "4d0accd1-68e0-4590-826c-0bf21c071a2d": "src/cli/commands/test/index.ts-simstep-b34213b2-a09b-4926-a190-90e241f96556",
+ "e26a7a82-c3e1-4eb7-8584-a8049de3795e": "generated-edge-simstep-9a2da392-1a53-4219-b26d-33618d0555fb-e26a7a82-c3e1-4eb7-8584-a8049de3795e",
+ "39ce2296-aa4d-45d7-90cc-3aa3bb34baa2": "generated-edge-simstep-5f5decb1-8823-4fb6-932a-0e47abab9d20-39ce2296-aa4d-45d7-90cc-3aa3bb34baa2",
+ "bbf01ef4-925a-4604-99a3-979dc79e0670": "generated-edge-simstep-b852328f-6f6c-4abf-865b-877cd1eeb3f1-bbf01ef4-925a-4604-99a3-979dc79e0670",
+ "dd88c6e4-fbf4-446d-a002-ccb3d386253b": "generated-edge-simstep-c6586631-d249-435c-965a-236f0004727c-dd88c6e4-fbf4-446d-a002-ccb3d386253b",
+ "95edb03e-789b-42eb-bcd6-8d10292433df": "generated-edge-simstep-5dd9ab50-00f4-420b-91c5-09ebe74d7a86-95edb03e-789b-42eb-bcd6-8d10292433df",
+ "a317af9a-f54b-49e5-8186-6d435a8ee88f": "generated-edge-simstep-fd9313e4-f193-4379-8299-8cee4b0c6a42-a317af9a-f54b-49e5-8186-6d435a8ee88f",
+ "e21febd9-f3e9-404e-b56b-e0b0de87119d": "snyk-cli-b8d7f01/src/cli/commands/test",
+ "59f81918-f28a-4a81-a1f3-90674f4ba98b": "snyk-cli-b8d7f01/src/cli/commands/test/iac",
+ "2f2829a3-ab4f-403a-b1e9-147673e82388": "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts",
+ "59e9a36e-2dea-47b9-8aa3-2e16bff95bce": "snyk-cli-b8d7f01/src/cli/commands/test/iac/scan.ts",
+ "65a9bc10-d113-4370-ab5b-5797e2f19126": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution",
+ "3f85cfa7-b2ff-4be6-a2a0-d573729fafa8": "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts",
+ "31646bb2-a8da-4354-abfa-a105b8b4aaca": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts",
+ "ceb4375e-c06d-4597-aebe-23cfcaa9c49c": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts",
+ "41734f98-e809-4868-b95a-b0729812ab46": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts",
+ "cc1b7e58-07b9-482b-b6cc-2172da07350e": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results",
+ "b2d182fe-c593-4fa9-94df-2fd932bafcce": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts",
+ "d40516fd-463a-4d22-ac46-9ccc199f9a64": "snyk-cli-b8d7f01/src/cli/commands/test/iac/index.ts-simstep-0d610bd9-4b7a-4394-a94d-7e9ab0220bb5",
+ "2a2136a1-26d6-4b85-8eed-6f0362aef3a1": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/index.ts-simstep-7bb3e65e-b598-465d-babc-5a3357482b7b",
+ "09d6740f-3538-4c0a-a1c5-42118a8af84c": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-parser.ts-simstep-53a50076-1327-4f49-8529-b8e1d95c4fb5",
+ "f488ec87-4b4f-4f04-a319-2ae372ff6c7d": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/file-scanner.ts-simstep-9f1609b0-7cca-43d9-ac49-d96eefddadbd",
+ "2b39850a-eb17-451c-a8c7-c7d8a244a765": "snyk-cli-b8d7f01/src/cli/commands/test/iac/local-execution/process-results/results-formatter.ts-simstep-c8fb9227-5b43-4a25-8daf-7e99770617ec",
+ "02dede36-57b9-46a8-9b12-d832a4263d36": "snyk-cli-b8d7f01/src/cli/commands/test/iac/output.ts-simstep-8017e430-d4ab-4001-99b7-073177b5e2a9",
+ "7a8f0002-4159-498f-8d19-6a8e8b13460f": "generated-edge-simstep-f6e1ec2b-b6e2-47f1-8824-62fbef34d6ec-7a8f0002-4159-498f-8d19-6a8e8b13460f",
+ "cfca8a58-793d-4900-a07b-ce67c880adcc": "generated-edge-simstep-3f061a24-dabb-4bdd-a6f3-4e1e5160c370-cfca8a58-793d-4900-a07b-ce67c880adcc",
+ "bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763": "generated-edge-simstep-86554b35-33a3-4fc4-bdf5-d218b842e89a-bf9a9f3c-ddfd-4447-b97a-7ccbcc82a763",
+ "7f4f9897-ca3b-4aa9-9c72-6ed854b8319e": "generated-edge-simstep-585c196a-cd46-4c51-ae04-dc8efd241ad1-7f4f9897-ca3b-4aa9-9c72-6ed854b8319e",
+ "bf67abac-660c-4a96-901e-43ab54491b86": "generated-edge-simstep-28bc0fc7-3a19-403a-b515-8053d058c231-bf67abac-660c-4a96-901e-43ab54491b86",
+ "53793438-dce6-483a-8993-97e7662a8d42": "snyk-cli-b8d7f01/src/cli/commands/auth",
+ "4ec38c9a-8fb5-412f-a04f-7205eadb5db3": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts",
+ "d8d32c3e-3063-49d2-9748-955fe2e54502": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts",
+ "019d9dd3-a90b-46d4-b6f9-e38d658a5540": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-d272eaa7-ead0-48f4-8297-17ee2edb70ee",
+ "b6ddda51-6d63-43cc-ba18-9228f6a0db94": "snyk-cli-b8d7f01/src/cli/commands/auth/verify.ts-simstep-bd504c66-5262-4759-9652-788c78022410",
+ "46b53f46-d7b9-4dc5-b511-37b341d206b3": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-bb8323cf-b3be-4b7a-bfdf-b00724fd94d2",
+ "a7936592-81ee-4bc4-a1fe-efbd087a2662": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-1f53ea1d-132d-4d0a-81c8-5e43ce78c9f7",
+ "389e9a12-2128-49cd-be28-08b2af738265": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-21a1edc6-531a-412d-824f-2fcf89a7c636",
+ "d70cd77f-39da-4a46-968f-86fa5655a0cc": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-8f197ea3-6a58-4ebe-b7da-ace35c8c0437",
+ "5f0301ca-f6e9-40e9-9e0c-3d239a0b3824": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-e29be9f6-e5fc-469c-b36c-36e24fef78a4",
+ "b9f46af5-eb4d-4b0e-9132-1b4a0cdb5b88": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-100156ef-69a7-4d75-a012-8e52701516bc",
+ "a11fe883-8ace-42b7-b5d4-49abcb0cd9d6": "snyk-cli-b8d7f01/src/cli/commands/auth/index.ts-simstep-a6b0976a-109e-48a8-8f27-ec9c921b6a3f",
+ "a634b412-e8ad-4445-afb7-6aa147745211": "generated-edge-simstep-0bb640b2-6aea-444b-8f66-16ecf5159687-a634b412-e8ad-4445-afb7-6aa147745211",
+ "a449bc86-9fbd-4910-b917-3905685a2598": "generated-edge-simstep-a3409c09-dca1-40e4-a81a-948021bab75e-a449bc86-9fbd-4910-b917-3905685a2598",
+ "69fd0286-e062-407c-bd1e-09253cc8869a": "generated-edge-simstep-6a031992-4b15-4124-b0d6-8c58fcdacebd-69fd0286-e062-407c-bd1e-09253cc8869a",
+ "5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4": "generated-edge-simstep-dfe86ab2-036e-4112-942d-4c072d2495a2-5f5eb3ba-4b1b-4ce7-ad22-82543b4815e4",
+ "03356d15-72f0-48b5-8812-277ae0c6c99d": "generated-edge-simstep-245b3521-8f79-4bf4-95fd-a1cd3112267d-03356d15-72f0-48b5-8812-277ae0c6c99d",
+ "8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7": "generated-edge-simstep-1df9cdfb-8e4a-458f-b278-3a109debb99d-8f73ca3d-fa94-47b7-bab7-d32fa8f3e3d7",
+ "241d3ca1-2314-4e53-882a-f16aab0e2c75": "generated-edge-simstep-b3b8840e-ffe0-492d-9b0e-d86171b0fa97-241d3ca1-2314-4e53-882a-f16aab0e2c75",
+ "a42c49ae-07ec-4413-9235-06e2b9c404a0": "snyk-cli-b8d7f01/help",
+ "e94dd5ce-8526-4f27-861e-e75f70441446": "snyk-cli-b8d7f01/test",
+ "0ec29183-bdee-470d-a429-c31d5f14dc31": "snyk-cli-b8d7f01/help/cli-commands",
+ "d58d5525-eb2f-4e38-98b7-870794be270e": "snyk-cli-b8d7f01/test/jest",
+ "4c7cf884-6ec5-4018-a74d-7aeb078fb2ef": "snyk-cli-b8d7f01/test/acceptance",
+ "2a94082d-8e68-4e8c-b792-def89c69a845": "snyk-cli-b8d7f01/help/cli-commands/sbom.md",
+ "547b6a18-fa3e-495f-af04-2e9c824eff92": "snyk-cli-b8d7f01/test/jest/acceptance",
+ "abbe9a10-c7b1-40f9-acf0-236755130bef": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts",
+ "078d87e8-7b02-428a-b089-8a7bd823f021": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom",
+ "6fde9c8f-c276-42ae-8343-b7160512d3f4": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts",
+ "f5274edb-f76d-406c-b9f5-b48eaff595ef": "snyk-cli-b8d7f01/help/cli-commands/sbom.md-simstep-e5f0127f-0d5e-4cff-93d7-559a74ce558e",
+ "83264e21-3db1-4eb0-8051-8edd66d6b78d": "snyk-cli-b8d7f01/help/cli-commands/sbom.md-simstep-e169da2c-940a-4ce4-b955-43cccdc9a50b",
+ "a0cfde3b-55f7-4796-995d-c4bb71a82047": "snyk-cli-b8d7f01/test/acceptance/fake-server.ts-simstep-f671fc80-497a-4f02-aa7d-2268e86d8a04",
+ "fd60fa14-6a9b-4f02-8842-31194f713045": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts-simstep-da6075bd-7a85-4ca3-b85f-459cf4d7dc81",
+ "f33f5035-43b2-4f08-a48d-00f74a767f82": "snyk-cli-b8d7f01/test/jest/acceptance/snyk-sbom/sbom.spec.ts-simstep-f044fa90-9219-4a05-94db-836fca272120",
+ "20667550-4ae5-486b-8711-f032d1ab608e": "generated-edge-simstep-2b2d61a1-4c9b-4c4e-b6d6-72f04ced24eb-20667550-4ae5-486b-8711-f032d1ab608e",
+ "0aebc819-85e7-40ab-8cb2-f838a2ed0a9c": "generated-edge-simstep-73b2957d-2316-4aa5-805f-f9c55657cfc8-0aebc819-85e7-40ab-8cb2-f838a2ed0a9c",
+ "1925d126-8d72-41a7-bdeb-f684048e2171": "generated-edge-simstep-935d8cbe-5c95-4fbb-aa94-01907c955999-1925d126-8d72-41a7-bdeb-f684048e2171",
+ "4ceea819-453f-46ca-9504-f7f7e7525095": "generated-edge-simstep-82ded9a2-d928-4676-98d2-123b4d7e18aa-4ceea819-453f-46ca-9504-f7f7e7525095",
+ "dee71ff9-9f20-483b-b323-e2a5309868ef": "snyk-cli-b8d7f01/src/lib",
+ "53a7517a-bd53-44fe-b38b-d41992699829": "snyk-cli-b8d7f01/src/cli/main.ts",
+ "e8af420a-217e-47a5-ae8c-a56d92a08527": "snyk-cli-b8d7f01/src/lib/formatters",
+ "6e65834a-7297-4c37-adcc-773907c98314": "snyk-cli-b8d7f01/src/cli/commands/types.ts",
+ "f1c3c149-991f-43e6-8f1b-4cfff7de36ce": "snyk-cli-b8d7f01/src/lib/formatters/test",
+ "a2b82ea8-7b7c-48b2-b06e-bbf26f4c89a4": "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts",
+ "04752c41-0bf0-482f-8cce-3a89abba9b44": "snyk-cli-b8d7f01/src/cli/main.ts-simstep-e7cd21df-d14a-4a0c-8a15-cfbadc5b7d39",
+ "498c33dc-49df-4015-bace-3cfd51ddbd44": "snyk-cli-b8d7f01/src/lib/formatters/test/format-test-results.ts-simstep-58f1dcbe-41e0-4f29-bb87-253c6f14ffa0",
+ "250f5cc5-58f7-47e0-b6e0-eba4e8fdbb43": "snyk-cli-b8d7f01/src/cli/main.ts-simstep-f37c67d6-73f0-41c2-9f61-241dad33c1da",
+ "a2fda714-66da-4da2-bec7-56912f90a421": "snyk-cli-b8d7f01/src/cli/main.ts-simstep-e12b444d-aecf-4f5b-840d-f71e82e84bf3",
+ "9d310562-b441-41d6-a9a8-61adaa8e602c": "generated-edge-simstep-705c5c99-7b5c-4dfa-8307-1d80c71c4fc0-9d310562-b441-41d6-a9a8-61adaa8e602c",
+ "64fa27e1-0d36-45c3-80d7-6db373bc6736": "generated-edge-simstep-3226af83-a2f7-4aa8-b9fc-9250a63a0c20-64fa27e1-0d36-45c3-80d7-6db373bc6736",
+ "18235737-3e12-4898-be1b-250a039ccf85": "generated-edge-simstep-c3e2b026-20c8-4c0a-b008-095abca52d74-18235737-3e12-4898-be1b-250a039ccf85",
+ "79ea1c0b-29c7-45f0-96a0-0c38ddc37ae9": "snyk-cli-b8d7f01/src/lib/policy",
+ "2c16b46f-4304-49df-9564-85bde1cc5b30": "snyk-cli-b8d7f01/src/lib/snyk-test",
+ "31bdaa23-2cd5-490c-8543-b3416ce603fa": "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts",
+ "fb7a73b3-74f1-4ddb-9a1d-6e414d5e8e5f": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts",
+ "b872abf0-9951-4faf-9d16-8ebcdf7dea58": "snyk-cli-b8d7f01/src/lib/policy/find-and-load-policy.ts-simstep-75f10feb-80fe-4a6c-8622-902f5cd7d812",
+ "687c1238-f8cd-46b1-9f08-8dd609866724": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts-simstep-cf4028f1-9fdf-43d6-b653-4429a498c884",
+ "a772fd68-6c56-4a80-bd7d-baeecf733f5d": "snyk-cli-b8d7f01/src/lib/snyk-test/run-test.ts-simstep-5a85d419-6e13-494a-98ad-93ec19bbd313",
+ "a08ccc2e-befb-46ae-833d-abdc919216a5": "generated-edge-simstep-31d0b0f0-0b46-4709-994a-3ab86171d54e-a08ccc2e-befb-46ae-833d-abdc919216a5",
+ "1f236d2c-b624-4f63-a48f-493622977624": "generated-edge-simstep-7b1d9946-136c-468b-b75d-15e4b65cf46d-1f236d2c-b624-4f63-a48f-493622977624"
+ }
+}
\ No newline at end of file
From 4b823192f5fbea685228aa99716ee6986b52a125 Mon Sep 17 00:00:00 2001
From: Nasser <42423897+Abdulnaser97@users.noreply.github.com>
Date: Fri, 3 Oct 2025 23:18:25 +0100
Subject: [PATCH 2/2] Add CodeCanvas diagram to README
---
README.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/README.md b/README.md
index 77175621ef..09eafa9f0b 100644
--- a/README.md
+++ b/README.md
@@ -109,6 +109,15 @@ In particular, see the information about the following options that you may find
- `--json`: Print results in JSON format.
- `--all-projects`: Auto-detect all Projects in the working directory.
+
+### How does `cli` work?
+
+Check out this interactive walkthrough of the `cli` codebase on CodeCanvas [here](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=cli&owner=snyk&branch=main&OnboardingTutorial=true).
+
+To update the diagram, follow the quick tutorial [here](https://docs.code-canvas.com/updating-diagram).
+
+
+
For detailed information about the CLI, see the [CLI documentation](https://docs.snyk.io/snyk-cli).
## Getting support for the Snyk CLI