From 25d55218c46fbf7e86dc99793c36d99e7527bf73 Mon Sep 17 00:00:00 2001 From: Eyal Delarea Date: Wed, 26 Jul 2023 16:31:10 +0300 Subject: [PATCH] Refactor Scan Pull Request to accept PR ID as input (#398) --- commands/scanpullrequest.go | 92 ++++++++---------- commands/scanpullrequest_test.go | 65 +++++-------- commands/scanpullrequests.go | 78 ++------------- commands/scanpullrequests_test.go | 28 ++---- .../frogbot-config-test-same-branch-fail.yml | 9 -- .../clean-test-proj/git/COMMIT_EDITMSG | 1 - .../scanpullrequest/clean-test-proj/git/HEAD | 1 - .../clean-test-proj/git/config | 7 -- .../clean-test-proj/git/description | 1 - .../scanpullrequest/clean-test-proj/git/index | Bin 145 -> 0 bytes .../clean-test-proj/git/info/exclude | 6 -- .../clean-test-proj/git/logs/HEAD | 1 - .../clean-test-proj/git/logs/refs/heads/main | 1 - .../35/0c38ebf1a9b77b101a355be46a6294aef763c7 | Bin 57 -> 0 bytes .../b7/761f99d321222c411d187405cc8354bdd1f696 | 2 - .../d1/9c36d673cc1654f310962d4ff97e23b9ff471b | Bin 83 -> 0 bytes .../clean-test-proj/git/refs/heads/main | 1 - .../clean-test-proj/package.json | 6 -- .../sourceBranch.gz} | Bin .../clean-test-proj/targetBranch.gz | Bin 0 -> 161 bytes .../expectedPullRequestDetailsResponse.json | 10 ++ .../multi-dir-test-proj/git/COMMIT_EDITMSG | 1 - .../multi-dir-test-proj/git/HEAD | 1 - .../multi-dir-test-proj/git/config | 7 -- .../multi-dir-test-proj/git/description | 1 - .../multi-dir-test-proj/git/index | Bin 9148 -> 0 bytes .../multi-dir-test-proj/git/info/exclude | 6 -- .../multi-dir-test-proj/git/logs/HEAD | 1 - .../git/logs/refs/heads/main | 1 - .../00/6ad0541dc967f47aee76cd59e1c6183598a1a5 | Bin 83 -> 0 bytes .../01/c87b876718ae3180c55528b36d9e98a325c025 | Bin 81 -> 0 bytes .../04/832e74bdfc41bcbaad009655fe7078cf167332 | 2 - .../08/37672d2319537596cef5a302eb3217829aa44d | Bin 83 -> 0 bytes .../10/fa14c5ab0134436e2ae435138bf921eb477c60 | Bin 784 -> 0 bytes .../10/fcf211c78a7f37965675b72ef5887058298f2c | Bin 76 -> 0 bytes .../16/a0255ee376b23a13f0663cdf6f9ed4ba88de24 | Bin 139 -> 0 bytes .../18/4cf0187c0f45b6a6a6ee102bfa91aeef4cc0cc | Bin 47 -> 0 bytes .../18/a78263f3a41fa30954a6b10c823776dfb8e09f | 2 - .../18/e5cedb4c64cc1599e43f345f658f658a2cc4bb | Bin 76 -> 0 bytes .../19/828baca3d92975c5056559c81ba5be93d9da54 | Bin 79 -> 0 bytes .../1a/b57990b53d8262b9fed8886d437bb4677d0982 | Bin 83 -> 0 bytes .../23/63d921c26161f1c010f3df560f2cb8874824a8 | Bin 49 -> 0 bytes .../23/aa033f78d0526de3f5615fc7e5349fe3bd4b61 | Bin 328 -> 0 bytes .../23/e856f5deeb7f564afc22f2beed54449c2d3afb | Bin 1972 -> 0 bytes .../28/ffb8240d13a74cef810501f69f4f1406349905 | Bin 48 -> 0 bytes .../2b/3ff217be2080ab3ec4c86758d015bacf5e0e5e | Bin 63 -> 0 bytes .../39/9eab1924e39da570b389b0bef1ca713b3b05c3 | 3 - .../3a/da079162b11ad3f77297e3cef7c02f93307fab | Bin 49 -> 0 bytes .../41/42082bcb939bbc17985a69ba748491ac6b62a5 | Bin 281 -> 0 bytes .../48/ab0354c18809f637b0df7cdfa5637c31ef5074 | Bin 328 -> 0 bytes .../49/8b267a8c7812490d6479839c5577eaaec79d62 | Bin 77 -> 0 bytes .../4a/939517f9bfe9ab67dd8d90cfb58d13fe0f4258 | Bin 80 -> 0 bytes .../4c/77be157a8e72e7ac5c7452d15e65383c89bb68 | Bin 180 -> 0 bytes .../4c/8a8549be996f11b2072fef68eb6491325fa02e | Bin 80 -> 0 bytes .../4c/e688d32b7532862767345f2b991ae856f7d4a8 | Bin 740 -> 0 bytes .../56/2efa0cb29c12078f94f6a6271a178bfd29bc91 | Bin 47 -> 0 bytes .../58/19fb8cf31384f08910df4571feddcd064af02c | Bin 57 -> 0 bytes .../5a/4bc8f4f16d62651783f414a454dd08fc69b86f | Bin 329 -> 0 bytes .../5e/de5c1ee80bf222c94a3e596e534d877d41266a | Bin 141 -> 0 bytes .../60/7ddb4e7656129da6f4bdbbc769fa04f647a403 | Bin 91 -> 0 bytes .../62/8bd54b7d63855841890b3b8277d1e4ba71be85 | Bin 49 -> 0 bytes .../64/ccd694a0965a2c7f958005fe2d8360c18d94f7 | Bin 96 -> 0 bytes .../65/c96377f2ad26e3ebe7179e95f73202e3ea7666 | 2 - .../6c/9406b7d9320db083eca69b3f8bee9a6c7b50d4 | Bin 114 -> 0 bytes .../6c/bef5c370d8c3486ca85423dd70440c5e0a2aa2 | Bin 2176 -> 0 bytes .../70/59c9ae1159581daefeef8fdb1152ba7b10d549 | Bin 79 -> 0 bytes .../73/ca9e6c4904275d3c8b761f07fc36ccf3601f3d | Bin 448 -> 0 bytes .../79/c8f644e0547f2eeb56144f2813c928bb89d18f | Bin 118 -> 0 bytes .../81/b35f6b33100db3b04d5cf9f1ad8d8ad558d341 | Bin 48 -> 0 bytes .../85/7247ab66122b18d726ea2a3a14fe6c3ca6f3fe | Bin 83 -> 0 bytes .../86/f4413dbc6161e6ed1649290d27f796e8ca0e75 | Bin 86 -> 0 bytes .../8c/ac4fe2a62f587d57d569abfd41e77869e2968f | 3 - .../8e/42fa779e5d1c955df94f3873bb53c83739b0ed | Bin 118 -> 0 bytes .../90/96f772441a7e776ebeebe0d5ce11a2995f608a | Bin 97 -> 0 bytes .../91/79d1949a5fbfaa2024bc06d8f7b3ef7ec3610d | Bin 150 -> 0 bytes .../93/aa7d63beebce296c8c86acdaa9f0411cf2a4ce | Bin 124 -> 0 bytes .../94/87da2f9e488f9814920be16d0af4b671feede9 | Bin 141 -> 0 bytes .../9f/2d684abdca56a22cea43121b9668d6d76f2767 | Bin 97 -> 0 bytes .../a1/fd29ec14823d8bc4a8d1a2cfe35451580f5118 | 3 - .../a5/196d1be8fb59edf8062bef36d3a602e0812139 | 1 - .../a5/d7b84a673458d14d9aab082183a1968c2c7492 | Bin 299 -> 0 bytes .../a8/5294c8052d3596ffbb5edc49e1cd0d7f9d28e1 | Bin 86 -> 0 bytes .../aa/1b74656043001f37a610a6f988e9c63bba6f4e | Bin 47 -> 0 bytes .../ab/a1aab5a69d27668622f93189f7f9e7ccc62e1f | Bin 48 -> 0 bytes .../af/5a0c0018b5e9c04b56ac52f21b4d28f48d99ea | Bin 1338 -> 0 bytes .../b0/737146b9269eaebd285320f1d939a2a3b3588b | Bin 47 -> 0 bytes .../b1/b716105590454bfc4c0247f193a04088f39c7f | Bin 20 -> 0 bytes .../b5/8d1184a9d43a39c0d95f32453efc78581877d6 | Bin 529 -> 0 bytes .../b8/70d82622c1a9ca6bcaf5df639680424a1904b0 | Bin 35 -> 0 bytes .../bb/8646f09ac436b9f303e439a097abd43c817eba | Bin 46 -> 0 bytes .../be/395946f46e946e096ecf4f31bf869d54ac71e8 | Bin 49 -> 0 bytes .../c2/f19dcaf3209fa0330f7a1986eb5193735dd991 | Bin 82 -> 0 bytes .../c4/d426bc6ee9430ee7813263ce6d5da7ec78c3c6 | Bin 1278 -> 0 bytes .../c8/8b2a15165058d5921a3ffd7cdffe9fd5c73f48 | Bin 52 -> 0 bytes .../cb/edc202b3998c809f7be4e52de280babb5785f2 | Bin 139 -> 0 bytes .../d0/3840cb4e4cab5bd0526dce1e35e2ed0e8fd0d6 | Bin 49 -> 0 bytes .../d4/f1807e301c3b96b02b3beeceab720789db5d90 | Bin 116 -> 0 bytes .../db/36a28856dd23a36d88db7b73ad38770fc89e9e | Bin 83 -> 0 bytes .../e1/44712c85c055bcf3248ab342592b440a477062 | Bin 950 -> 0 bytes .../e7/2f2147a0ccf0b7cad5a73fa4b241676b64e745 | Bin 60 -> 0 bytes .../e7/905292c5e1159574427f6645c8da60f64a1909 | Bin 57 -> 0 bytes .../e9/162c80c140fa69bd4d2306357cf972501228f9 | Bin 79 -> 0 bytes .../ec/17ec1939b7c3e86b7cb6c0c4de6b0818a7e75e | 2 - .../f1/0f53253a76ffbb59f56bf3746507b9e5c88985 | Bin 154 -> 0 bytes .../f4/613cb98ea7ac3adcb446aeb2a0523ad3476ecf | Bin 83 -> 0 bytes .../f9/5e34847d032c1b1440cbfa854f235484d58e85 | Bin 54 -> 0 bytes .../f9/9690a1d6f831b243cced0ec0d683f422a18615 | Bin 81 -> 0 bytes .../fd/9f6fa59134f2900f583d35a3387a064e0b661d | Bin 140 -> 0 bytes .../multi-dir-test-proj/git/refs/heads/main | 1 - .../multi-dir-test-proj/sourceBranch.gz | Bin 0 -> 650 bytes .../multi-dir-test-proj/sub1/package.json | 8 -- .../multi-dir-test-proj/sub2/requirements.txt | 2 - .../sub3/sub4/package.json | 8 -- .../targetBranch.gz} | Bin .../scanpullrequest/test-proj-no-vul.tar.gz | Bin 13419 -> 0 bytes .../test-proj-pip/git/COMMIT_EDITMSG | 1 - .../scanpullrequest/test-proj-pip/git/HEAD | 1 - .../scanpullrequest/test-proj-pip/git/config | 7 -- .../test-proj-pip/git/description | 1 - .../scanpullrequest/test-proj-pip/git/index | Bin 137 -> 0 bytes .../test-proj-pip/git/info/exclude | 6 -- .../test-proj-pip/git/logs/HEAD | 1 - .../test-proj-pip/git/logs/refs/heads/main | 1 - .../54/b376eb402cf9ef89447f23afb5ef0f6de96d7e | 2 - .../5e/dae408cad286ea89e241d46ca1a958d1e420db | 1 - .../90/2d499e48521e7f329f0387e4da6bbfbba0d0b2 | Bin 53 -> 0 bytes .../test-proj-pip/git/refs/heads/main | 1 - .../scanpullrequest/test-proj-pip/setup.py | 10 -- .../test-proj-pip/sourceBranch.gz | Bin 0 -> 525 bytes .../targetBranch.gz} | Bin .../test-proj-subdir/git/COMMIT_EDITMSG | 1 - .../scanpullrequest/test-proj-subdir/git/HEAD | 1 - .../test-proj-subdir/git/config | 7 -- .../test-proj-subdir/git/description | 1 - .../test-proj-subdir/git/index | Bin 184 -> 0 bytes .../test-proj-subdir/git/info/exclude | 6 -- .../test-proj-subdir/git/logs/HEAD | 1 - .../test-proj-subdir/git/logs/refs/heads/main | 1 - .../90/42489fc531a41457e0ade414da57b2bc9bd8bc | Bin 119 -> 0 bytes .../9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 | 1 - .../a8/23985885ee12bf657a581dda6a1450cb480143 | Bin 48 -> 0 bytes .../c6/37dbf31c89559c8c4040d740b8abe554404e8d | Bin 57 -> 0 bytes .../test-proj-subdir/git/refs/heads/main | 1 - .../test-proj-subdir/sourceBranch.gz | Bin 0 -> 267 bytes .../test-proj-subdir/subdir/package.json | 8 -- .../targetBranch.gz} | Bin .../test-proj/git/COMMIT_EDITMSG | 1 - .../scanpullrequest/test-proj/git/HEAD | 1 - .../scanpullrequest/test-proj/git/config | 7 -- .../scanpullrequest/test-proj/git/description | 1 - .../scanpullrequest/test-proj/git/index | Bin 145 -> 0 bytes .../test-proj/git/info/exclude | 6 -- .../scanpullrequest/test-proj/git/logs/HEAD | 1 - .../test-proj/git/logs/refs/heads/main | 1 - .../9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 | 1 - .../9f/19e8e214da2ec75e3191980f30b567c7558ff7 | Bin 118 -> 0 bytes .../c6/37dbf31c89559c8c4040d740b8abe554404e8d | Bin 57 -> 0 bytes .../test-proj/git/refs/heads/main | 1 - .../test-proj/package-lock.json | 71 -------------- .../scanpullrequest/test-proj/package.json | 8 -- .../scanpullrequest/test-proj/sourceBranch.gz | Bin 0 -> 1092 bytes .../targetBranch.gz} | Bin .../test-same-branch-fail.tar.gz | Bin 13160 -> 0 bytes .../test-same-branch-fail/git/COMMIT_EDITMSG | 1 - .../test-same-branch-fail/git/HEAD | 1 - .../test-same-branch-fail/git/config | 7 -- .../test-same-branch-fail/git/description | 1 - .../test-same-branch-fail/git/index | Bin 145 -> 0 bytes .../test-same-branch-fail/git/info/exclude | 6 -- .../test-same-branch-fail/git/logs/HEAD | 2 - .../git/logs/refs/heads/main | 2 - .../04/0abf2a9d8a9f4aeaede3b8431d988d57fddf36 | Bin 119 -> 0 bytes .../41/0fc517e03bad9856571ee01247417d91a5405d | 1 - .../9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 | 1 - .../b8/5f31622acb022542282ac7cdd5ff7880c4cbf7 | Bin 57 -> 0 bytes .../c6/37dbf31c89559c8c4040d740b8abe554404e8d | Bin 57 -> 0 bytes .../eb/e022f659464ddc9f973bce7d5c491a6484d210 | Bin 149 -> 0 bytes .../test-same-branch-fail/git/refs/heads/main | 1 - .../test-same-branch-fail/package.json | 8 -- .../test-proj/package.json | 8 -- .../test-proj/test-proj/package.json | 8 -- commands/utils/consts.go | 3 +- commands/utils/params.go | 17 ++-- commands/utils/params_test.go | 4 +- commands/utils/scandetails.go | 5 + commands/utils/utils.go | 1 + .../frogbot-scan-pr-dotnet.yml | 4 - .../scan-pull-request/frogbot-scan-pr-go.yml | 4 - .../frogbot-scan-pr-gradle.yml | 4 - .../frogbot-scan-pr-maven.yml | 4 - .../scan-pull-request/frogbot-scan-pr-npm.yml | 4 - .../frogbot-scan-pr-nuget.yml | 4 - .../scan-pull-request/frogbot-scan-pr-pip.yml | 4 - .../frogbot-scan-pr-pipenv.yml | 4 - .../frogbot-scan-pr-poetry.yml | 4 - .../frogbot-scan-pr-yarn.yml | 4 - go.mod | 2 +- go.sum | 4 +- .../code-scanning/frogbot-scan-pr.yml | 4 - 199 files changed, 114 insertions(+), 536 deletions(-) delete mode 100644 commands/testdata/config/frogbot-config-test-same-branch-fail.yml delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/COMMIT_EDITMSG delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/HEAD delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/config delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/description delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/index delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/info/exclude delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/logs/HEAD delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/logs/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/objects/35/0c38ebf1a9b77b101a355be46a6294aef763c7 delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/objects/b7/761f99d321222c411d187405cc8354bdd1f696 delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/objects/d1/9c36d673cc1654f310962d4ff97e23b9ff471b delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/git/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/clean-test-proj/package.json rename commands/testdata/scanpullrequest/{clean-test-proj.tar.gz => clean-test-proj/sourceBranch.gz} (100%) create mode 100644 commands/testdata/scanpullrequest/clean-test-proj/targetBranch.gz create mode 100644 commands/testdata/scanpullrequest/expectedPullRequestDetailsResponse.json delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/COMMIT_EDITMSG delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/HEAD delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/config delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/description delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/index delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/info/exclude delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/logs/HEAD delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/logs/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/00/6ad0541dc967f47aee76cd59e1c6183598a1a5 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/01/c87b876718ae3180c55528b36d9e98a325c025 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/04/832e74bdfc41bcbaad009655fe7078cf167332 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/08/37672d2319537596cef5a302eb3217829aa44d delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/10/fa14c5ab0134436e2ae435138bf921eb477c60 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/10/fcf211c78a7f37965675b72ef5887058298f2c delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/16/a0255ee376b23a13f0663cdf6f9ed4ba88de24 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/4cf0187c0f45b6a6a6ee102bfa91aeef4cc0cc delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/a78263f3a41fa30954a6b10c823776dfb8e09f delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/e5cedb4c64cc1599e43f345f658f658a2cc4bb delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/19/828baca3d92975c5056559c81ba5be93d9da54 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/1a/b57990b53d8262b9fed8886d437bb4677d0982 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/23/63d921c26161f1c010f3df560f2cb8874824a8 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/23/aa033f78d0526de3f5615fc7e5349fe3bd4b61 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/23/e856f5deeb7f564afc22f2beed54449c2d3afb delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/28/ffb8240d13a74cef810501f69f4f1406349905 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/2b/3ff217be2080ab3ec4c86758d015bacf5e0e5e delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/39/9eab1924e39da570b389b0bef1ca713b3b05c3 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/3a/da079162b11ad3f77297e3cef7c02f93307fab delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/41/42082bcb939bbc17985a69ba748491ac6b62a5 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/48/ab0354c18809f637b0df7cdfa5637c31ef5074 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/49/8b267a8c7812490d6479839c5577eaaec79d62 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/4a/939517f9bfe9ab67dd8d90cfb58d13fe0f4258 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/4c/77be157a8e72e7ac5c7452d15e65383c89bb68 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/4c/8a8549be996f11b2072fef68eb6491325fa02e delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/4c/e688d32b7532862767345f2b991ae856f7d4a8 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/56/2efa0cb29c12078f94f6a6271a178bfd29bc91 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/58/19fb8cf31384f08910df4571feddcd064af02c delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/5a/4bc8f4f16d62651783f414a454dd08fc69b86f delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/5e/de5c1ee80bf222c94a3e596e534d877d41266a delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/60/7ddb4e7656129da6f4bdbbc769fa04f647a403 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/62/8bd54b7d63855841890b3b8277d1e4ba71be85 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/64/ccd694a0965a2c7f958005fe2d8360c18d94f7 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/65/c96377f2ad26e3ebe7179e95f73202e3ea7666 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/6c/9406b7d9320db083eca69b3f8bee9a6c7b50d4 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/6c/bef5c370d8c3486ca85423dd70440c5e0a2aa2 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/70/59c9ae1159581daefeef8fdb1152ba7b10d549 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/73/ca9e6c4904275d3c8b761f07fc36ccf3601f3d delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/79/c8f644e0547f2eeb56144f2813c928bb89d18f delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/81/b35f6b33100db3b04d5cf9f1ad8d8ad558d341 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/85/7247ab66122b18d726ea2a3a14fe6c3ca6f3fe delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/86/f4413dbc6161e6ed1649290d27f796e8ca0e75 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/8c/ac4fe2a62f587d57d569abfd41e77869e2968f delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/8e/42fa779e5d1c955df94f3873bb53c83739b0ed delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/90/96f772441a7e776ebeebe0d5ce11a2995f608a delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/91/79d1949a5fbfaa2024bc06d8f7b3ef7ec3610d delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/93/aa7d63beebce296c8c86acdaa9f0411cf2a4ce delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/94/87da2f9e488f9814920be16d0af4b671feede9 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/9f/2d684abdca56a22cea43121b9668d6d76f2767 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a1/fd29ec14823d8bc4a8d1a2cfe35451580f5118 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a5/196d1be8fb59edf8062bef36d3a602e0812139 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a5/d7b84a673458d14d9aab082183a1968c2c7492 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a8/5294c8052d3596ffbb5edc49e1cd0d7f9d28e1 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/aa/1b74656043001f37a610a6f988e9c63bba6f4e delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/ab/a1aab5a69d27668622f93189f7f9e7ccc62e1f delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/af/5a0c0018b5e9c04b56ac52f21b4d28f48d99ea delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/b0/737146b9269eaebd285320f1d939a2a3b3588b delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/b1/b716105590454bfc4c0247f193a04088f39c7f delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/b5/8d1184a9d43a39c0d95f32453efc78581877d6 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/b8/70d82622c1a9ca6bcaf5df639680424a1904b0 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/bb/8646f09ac436b9f303e439a097abd43c817eba delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/be/395946f46e946e096ecf4f31bf869d54ac71e8 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/c2/f19dcaf3209fa0330f7a1986eb5193735dd991 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/c4/d426bc6ee9430ee7813263ce6d5da7ec78c3c6 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/c8/8b2a15165058d5921a3ffd7cdffe9fd5c73f48 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/cb/edc202b3998c809f7be4e52de280babb5785f2 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/d0/3840cb4e4cab5bd0526dce1e35e2ed0e8fd0d6 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/d4/f1807e301c3b96b02b3beeceab720789db5d90 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/db/36a28856dd23a36d88db7b73ad38770fc89e9e delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/e1/44712c85c055bcf3248ab342592b440a477062 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/e7/2f2147a0ccf0b7cad5a73fa4b241676b64e745 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/e7/905292c5e1159574427f6645c8da60f64a1909 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/e9/162c80c140fa69bd4d2306357cf972501228f9 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/ec/17ec1939b7c3e86b7cb6c0c4de6b0818a7e75e delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/f1/0f53253a76ffbb59f56bf3746507b9e5c88985 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/f4/613cb98ea7ac3adcb446aeb2a0523ad3476ecf delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/f9/5e34847d032c1b1440cbfa854f235484d58e85 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/f9/9690a1d6f831b243cced0ec0d683f422a18615 delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/fd/9f6fa59134f2900f583d35a3387a064e0b661d delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/git/refs/heads/main create mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/sourceBranch.gz delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/sub1/package.json delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/sub2/requirements.txt delete mode 100644 commands/testdata/scanpullrequest/multi-dir-test-proj/sub3/sub4/package.json rename commands/testdata/scanpullrequest/{multi-dir-test-proj.tar.gz => multi-dir-test-proj/targetBranch.gz} (100%) delete mode 100644 commands/testdata/scanpullrequest/test-proj-no-vul.tar.gz delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/COMMIT_EDITMSG delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/HEAD delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/config delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/description delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/index delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/info/exclude delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/logs/HEAD delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/logs/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/objects/54/b376eb402cf9ef89447f23afb5ef0f6de96d7e delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/objects/5e/dae408cad286ea89e241d46ca1a958d1e420db delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/objects/90/2d499e48521e7f329f0387e4da6bbfbba0d0b2 delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/git/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/test-proj-pip/setup.py create mode 100644 commands/testdata/scanpullrequest/test-proj-pip/sourceBranch.gz rename commands/testdata/scanpullrequest/{test-proj-pip.tar.gz => test-proj-pip/targetBranch.gz} (100%) delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/COMMIT_EDITMSG delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/HEAD delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/config delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/description delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/index delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/info/exclude delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/logs/HEAD delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/logs/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/objects/90/42489fc531a41457e0ade414da57b2bc9bd8bc delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/objects/a8/23985885ee12bf657a581dda6a1450cb480143 delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/objects/c6/37dbf31c89559c8c4040d740b8abe554404e8d delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/git/refs/heads/main create mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/sourceBranch.gz delete mode 100644 commands/testdata/scanpullrequest/test-proj-subdir/subdir/package.json rename commands/testdata/scanpullrequest/{test-proj-subdir.tar.gz => test-proj-subdir/targetBranch.gz} (100%) delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/COMMIT_EDITMSG delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/HEAD delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/config delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/description delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/index delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/info/exclude delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/logs/HEAD delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/logs/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/objects/9f/19e8e214da2ec75e3191980f30b567c7558ff7 delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/objects/c6/37dbf31c89559c8c4040d740b8abe554404e8d delete mode 100644 commands/testdata/scanpullrequest/test-proj/git/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/test-proj/package-lock.json delete mode 100644 commands/testdata/scanpullrequest/test-proj/package.json create mode 100644 commands/testdata/scanpullrequest/test-proj/sourceBranch.gz rename commands/testdata/scanpullrequest/{test-proj.tar.gz => test-proj/targetBranch.gz} (100%) delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail.tar.gz delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/COMMIT_EDITMSG delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/HEAD delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/config delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/description delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/index delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/info/exclude delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/logs/HEAD delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/logs/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/04/0abf2a9d8a9f4aeaede3b8431d988d57fddf36 delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/41/0fc517e03bad9856571ee01247417d91a5405d delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/b8/5f31622acb022542282ac7cdd5ff7880c4cbf7 delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/c6/37dbf31c89559c8c4040d740b8abe554404e8d delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/eb/e022f659464ddc9f973bce7d5c491a6484d210 delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/git/refs/heads/main delete mode 100644 commands/testdata/scanpullrequest/test-same-branch-fail/package.json delete mode 100644 commands/testdata/scanpullrequests/test-proj-with-vulnerability/test-proj/package.json delete mode 100644 commands/testdata/scanpullrequests/test-proj/test-proj/package.json diff --git a/commands/scanpullrequest.go b/commands/scanpullrequest.go index 98095b20d..d2dede312 100644 --- a/commands/scanpullrequest.go +++ b/commands/scanpullrequest.go @@ -4,7 +4,6 @@ import ( "context" "errors" "fmt" - "github.com/go-git/go-git/v5" "github.com/jfrog/gofrog/datastructures" "os" "os/exec" @@ -27,58 +26,43 @@ const ( noGitHubEnvReviewersErr = "frogbot did not scan this PR, because the existing GitHub Environment named 'frogbot' doesn't have reviewers selected. Please refer to the Frogbot documentation for instructions on how to create the Environment" ) -type ScanPullRequestCmd struct{} +type ScanPullRequestCmd struct { + // Optional provided pull request details, used in scan-pull-requests command. + pullRequestDetails vcsclient.PullRequestInfo +} // Run ScanPullRequest method only works for a single repository scan. // Therefore, the first repository config represents the repository on which Frogbot runs, and it is the only one that matters. -func (cmd *ScanPullRequestCmd) Run(configAggregator utils.RepoAggregator, client vcsclient.VcsClient) error { - if err := utils.ValidateSingleRepoConfiguration(&configAggregator); err != nil { - return err +func (cmd *ScanPullRequestCmd) Run(configAggregator utils.RepoAggregator, client vcsclient.VcsClient) (err error) { + if err = utils.ValidateSingleRepoConfiguration(&configAggregator); err != nil { + return } repoConfig := &(configAggregator)[0] if repoConfig.GitProvider == vcsutils.GitHub { - if err := verifyGitHubFrogbotEnvironment(client, repoConfig); err != nil { - return err + if err = verifyGitHubFrogbotEnvironment(client, repoConfig); err != nil { + return } } - if err := cmd.verifyDifferentBranches(repoConfig); err != nil { - return err - } - return scanPullRequest(repoConfig, client) -} -// Verifies current branch and target branch are not the same. -// The Current branch is the branch the action is triggered on. -// The Target branch is the branch to open pull request to. -func (cmd *ScanPullRequestCmd) verifyDifferentBranches(repoConfig *utils.Repository) error { - repo, err := git.PlainOpen(".") - if err != nil { - return err - } - ref, err := repo.Head() - if err != nil { - return err - } - currentBranch := ref.Name().Short() - defaultBranch := repoConfig.Branches[0] - if currentBranch == defaultBranch { - return fmt.Errorf(utils.ErrScanPullRequestSameBranches, currentBranch) + // PullRequestDetails can be defined already when using the scan-all-pull-requests command. + if cmd.pullRequestDetails.ID == utils.UndefinedPrID { + if cmd.pullRequestDetails, err = client.GetPullRequestByID(context.Background(), repoConfig.RepoOwner, repoConfig.RepoName, repoConfig.PullRequestID); err != nil { + return + } } - return nil + + return scanPullRequest(repoConfig, client, cmd.pullRequestDetails) } // By default, includeAllVulnerabilities is set to false and the scan goes as follows: // a. Audit the dependencies of the source and the target branches. // b. Compare the vulnerabilities found in source and target branches, and show only the new vulnerabilities added by the pull request. // Otherwise, only the source branch is scanned and all found vulnerabilities are being displayed. -func scanPullRequest(repoConfig *utils.Repository, client vcsclient.VcsClient) error { - // Validate scan params - if len(repoConfig.Branches) == 0 { - return &utils.ErrMissingEnv{VariableName: utils.GitBaseBranchEnv} - } - +func scanPullRequest(repoConfig *utils.Repository, client vcsclient.VcsClient, pullRequestDetails vcsclient.PullRequestInfo) error { + log.Info("Scanning Pull Request ID:", pullRequestDetails.ID, "Source:", pullRequestDetails.Source.Name, "Target:", pullRequestDetails.Target.Name) + log.Info("-----------------------------------------------------------") // Audit PR code - vulnerabilitiesRows, iacRows, err := auditPullRequest(repoConfig, client) + vulnerabilitiesRows, iacRows, err := auditPullRequest(repoConfig, client, pullRequestDetails) if err != nil { return err } @@ -98,17 +82,23 @@ func scanPullRequest(repoConfig *utils.Repository, client vcsclient.VcsClient) e return err } -func auditPullRequest(repoConfig *utils.Repository, client vcsclient.VcsClient) ([]formats.VulnerabilityOrViolationRow, []formats.IacSecretsRow, error) { +// Downloads Pull Requests branches code and audits them +func auditPullRequest(repoConfig *utils.Repository, client vcsclient.VcsClient, pullRequestDetails vcsclient.PullRequestInfo) ([]formats.VulnerabilityOrViolationRow, []formats.IacSecretsRow, error) { var vulnerabilitiesRows []formats.VulnerabilityOrViolationRow var iacRows []formats.IacSecretsRow - targetBranch := repoConfig.Branches[0] + targetBranch := pullRequestDetails.Target.Name + sourceBranch := pullRequestDetails.Source.Name for i := range repoConfig.Projects { + // Source scan details scanDetails := utils.NewScanDetails(client, &repoConfig.Server, &repoConfig.Git). SetProject(&repoConfig.Projects[i]). SetXrayGraphScanParams(repoConfig.Watches, repoConfig.JFrogProjectKey). SetMinSeverity(repoConfig.MinSeverity). - SetFixableOnly(repoConfig.FixableOnly) - sourceResults, err := auditSource(scanDetails) + SetFixableOnly(repoConfig.FixableOnly). + SetBranch(sourceBranch). + SetRepoOwner(pullRequestDetails.Source.Owner) + + sourceResults, err := downloadAndAuditBranch(scanDetails) if err != nil { return nil, nil, err } @@ -123,9 +113,12 @@ func auditPullRequest(repoConfig *utils.Repository, client vcsclient.VcsClient) iacRows = append(iacRows, xrayutils.PrepareIacs(sourceResults.ExtendedScanResults.IacScanResults)...) continue } - // Audit target code - scanDetails.SetFailOnInstallationErrors(*repoConfig.FailOnSecurityIssues).SetBranch(targetBranch) - targetResults, err := auditTarget(scanDetails) + // Target scan details + scanDetails.SetFailOnInstallationErrors(*repoConfig.FailOnSecurityIssues). + SetBranch(targetBranch). + SetRepoOwner(pullRequestDetails.Target.Owner) + + targetResults, err := downloadAndAuditBranch(scanDetails) if err != nil { return nil, nil, err } @@ -235,15 +228,6 @@ func getScanVulnerabilitiesRows(auditResults *audit.Results) ([]formats.Vulnerab return []formats.VulnerabilityOrViolationRow{}, nil } -func auditSource(scanSetup *utils.ScanDetails) (auditResults *audit.Results, err error) { - wd, err := os.Getwd() - if err != nil { - return - } - fullPathWds := getFullPathWorkingDirs(scanSetup.WorkingDirs, wd) - return runInstallAndAudit(scanSetup, fullPathWds...) -} - func getFullPathWorkingDirs(workingDirs []string, baseWd string) []string { var fullPathWds []string if len(workingDirs) != 0 { @@ -260,9 +244,9 @@ func getFullPathWorkingDirs(workingDirs []string, baseWd string) []string { return fullPathWds } -func auditTarget(scanSetup *utils.ScanDetails) (auditResults *audit.Results, err error) { +func downloadAndAuditBranch(scanSetup *utils.ScanDetails) (auditResults *audit.Results, err error) { // First download the target repo to temp dir - log.Info("Auditing the", scanSetup.Git.RepoName, "repository on the", scanSetup.Branch(), "branch") + log.Info("Auditing repository:", scanSetup.Git.RepoName, "branch:", scanSetup.Branch()) wd, cleanup, err := utils.DownloadRepoToTempDir(scanSetup.Client(), scanSetup.Branch(), scanSetup.Git) if err != nil { return diff --git a/commands/scanpullrequest_test.go b/commands/scanpullrequest_test.go index 9a11b3c22..bcd1c291d 100644 --- a/commands/scanpullrequest_test.go +++ b/commands/scanpullrequest_test.go @@ -34,7 +34,8 @@ const ( testCleanProjConfigPath = "testdata/config/frogbot-config-clean-test-proj.yml" testProjConfigPath = "testdata/config/frogbot-config-test-proj.yml" testProjConfigPathNoFail = "testdata/config/frogbot-config-test-proj-no-fail.yml" - testSameBranchProjConfigPath = "testdata/config/frogbot-config-test-same-branch-fail.yml" + testSourceBranchName = "pr" + testTargetBranchName = "master" ) func TestCreateVulnerabilitiesRows(t *testing.T) { @@ -504,32 +505,6 @@ func TestScanPullRequest(t *testing.T) { testScanPullRequest(t, testProjConfigPath, "test-proj", true) } -func TestScanPullRequestSameBranchFail(t *testing.T) { - params, restoreEnv := verifyEnv(t) - defer restoreEnv() - - // Create mock GitLab server - projectName := "test-same-branch-fail" - - server := httptest.NewServer(createGitLabHandler(t, projectName)) - defer server.Close() - - configAggregator, client := prepareConfigAndClient(t, testSameBranchProjConfigPath, server, params) - _, cleanUp := utils.PrepareTestEnvironment(t, projectName, "scanpullrequest") - defer cleanUp() - - // Run "frogbot scan pull request" - var scanPullRequest ScanPullRequestCmd - err := scanPullRequest.Run(configAggregator, client) - exceptedError := fmt.Errorf(utils.ErrScanPullRequestSameBranches, "main") - assert.Equal(t, exceptedError, err) - - // Check env sanitize - err = utils.SanitizeEnv() - assert.NoError(t, err) - utils.AssertSanitizedEnv(t) -} - func TestScanPullRequestNoFail(t *testing.T) { testScanPullRequest(t, testProjConfigPathNoFail, "test-proj", false) } @@ -663,30 +638,43 @@ func TestScanPullRequestError(t *testing.T) { // Create HTTP handler to mock GitLab server func createGitLabHandler(t *testing.T, projectName string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { + switch r.RequestURI { // Return 200 on ping - if r.RequestURI == "/api/v4/" { + case "/api/v4/": w.WriteHeader(http.StatusOK) return - } - - // Return test-proj.tar.gz when using DownloadRepository - if r.RequestURI == fmt.Sprintf("/api/v4/projects/jfrog%s/repository/archive.tar.gz?sha=master", "%2F"+projectName) { + // Mimic get pull request by ID + case fmt.Sprintf("/api/v4/projects/jfrog%s/merge_requests/1", "%2F"+projectName): w.WriteHeader(http.StatusOK) - repoFile, err := os.ReadFile(filepath.Join("..", projectName+".tar.gz")) + expectedResponse, err := os.ReadFile(filepath.Join("..", "expectedPullRequestDetailsResponse.json")) + assert.NoError(t, err) + _, err = w.Write(expectedResponse) + assert.NoError(t, err) + return + // Mimic download specific branch to scan + case fmt.Sprintf("/api/v4/projects/jfrog%s/repository/archive.tar.gz?sha=%s", "%2F"+projectName, testSourceBranchName): + w.WriteHeader(http.StatusOK) + repoFile, err := os.ReadFile(filepath.Join("..", projectName, "sourceBranch.gz")) assert.NoError(t, err) _, err = w.Write(repoFile) assert.NoError(t, err) - } + return + // Download repository mock + case fmt.Sprintf("/api/v4/projects/jfrog%s/repository/archive.tar.gz?sha=%s", "%2F"+projectName, testTargetBranchName): + w.WriteHeader(http.StatusOK) + repoFile, err := os.ReadFile(filepath.Join("..", projectName, "targetBranch.gz")) + assert.NoError(t, err) + _, err = w.Write(repoFile) + assert.NoError(t, err) + return // clean-test-proj should not include any vulnerabilities so assertion is not needed. - if r.RequestURI == fmt.Sprintf("/api/v4/projects/jfrog%s/merge_requests/1/notes", "%2Fclean-test-proj") { + case fmt.Sprintf("/api/v4/projects/jfrog%s/merge_requests/1/notes", "%2Fclean-test-proj"): w.WriteHeader(http.StatusOK) _, err := w.Write([]byte("{}")) assert.NoError(t, err) return - } - // Return 200 when using the REST that creates the comment - if r.RequestURI == fmt.Sprintf("/api/v4/projects/jfrog%s/merge_requests/1/notes", "%2F"+projectName) { + case fmt.Sprintf("/api/v4/projects/jfrog%s/merge_requests/1/notes", "%2F"+projectName): buf := new(bytes.Buffer) _, err := buf.ReadFrom(r.Body) assert.NoError(t, err) @@ -707,6 +695,7 @@ func createGitLabHandler(t *testing.T, projectName string) http.HandlerFunc { w.WriteHeader(http.StatusOK) _, err = w.Write([]byte("{}")) assert.NoError(t, err) + return } } } diff --git a/commands/scanpullrequests.go b/commands/scanpullrequests.go index e96c716ea..d311aae0c 100644 --- a/commands/scanpullrequests.go +++ b/commands/scanpullrequests.go @@ -19,12 +19,13 @@ type ScanAllPullRequestsCmd struct { func (cmd ScanAllPullRequestsCmd) Run(configAggregator utils.RepoAggregator, client vcsclient.VcsClient) error { for _, config := range configAggregator { + log.Info("Scanning all open pull requests for repository:", config.RepoName) + log.Info("-----------------------------------------------------------") err := scanAllPullRequests(config, client) if err != nil { return err } } - return nil } @@ -43,14 +44,14 @@ func scanAllPullRequests(repo utils.Repository, client vcsclient.VcsClient) (err if e != nil { err = errors.Join(err, fmt.Errorf(errPullRequestScan, int(pr.ID), repo.RepoName, e.Error())) } - if shouldScan { - e = downloadAndScanPullRequest(pr, repo, client) - // If error, write it in errList and continue to the next PR. - if e != nil { - err = errors.Join(err, fmt.Errorf(errPullRequestScan, int(pr.ID), repo.RepoName, e.Error())) - } - } else { + if !shouldScan { log.Info("Pull Request", pr.ID, "has already been scanned before. If you wish to scan it again, please comment \"rescan\".") + return + } + spr := &ScanPullRequestCmd{pullRequestDetails: pr} + if e = spr.Run(utils.RepoAggregator{repo}, client); e != nil { + // If error, write it in errList and continue to the next PR. + err = errors.Join(err, fmt.Errorf(errPullRequestScan, int(pr.ID), repo.RepoName, e.Error())) } } return @@ -83,64 +84,3 @@ func shouldScanPullRequest(repo utils.Repository, client vcsclient.VcsClient, pr func isFrogbotRescanComment(comment string) bool { return strings.Contains(strings.ToLower(strings.TrimSpace(comment)), utils.RescanRequestComment) } - -func downloadAndScanPullRequest(pr vcsclient.PullRequestInfo, repo utils.Repository, client vcsclient.VcsClient) (err error) { - // Download the pull request source ("from") branch - params := utils.Params{ - Git: utils.Git{ - ClientInfo: utils.ClientInfo{ - GitProvider: repo.GitProvider, - VcsInfo: vcsclient.VcsInfo{APIEndpoint: repo.APIEndpoint, Token: repo.Token}, - RepoOwner: repo.RepoOwner, - RepoName: pr.Source.Repository, - Branches: []string{pr.Source.Name}}, - }} - frogbotParams := &utils.Repository{ - Server: repo.Server, - Params: params, - } - wd, cleanup, err := utils.DownloadRepoToTempDir(client, pr.Source.Name, &frogbotParams.Git) - if err != nil { - return err - } - // Cleanup - defer func() { - err = errors.Join(err, cleanup()) - }() - restoreDir, err := utils.Chdir(wd) - if err != nil { - return err - } - defer func() { - err = errors.Join(err, restoreDir()) - }() - // The target branch (to) will be downloaded as part of the Frogbot scanPullRequest execution - params = utils.Params{ - Scan: utils.Scan{ - FailOnSecurityIssues: repo.FailOnSecurityIssues, - IncludeAllVulnerabilities: repo.IncludeAllVulnerabilities, - Projects: repo.Projects, - }, - Git: utils.Git{ - ClientInfo: utils.ClientInfo{ - GitProvider: repo.GitProvider, - VcsInfo: vcsclient.VcsInfo{APIEndpoint: repo.APIEndpoint, Token: repo.Token}, - RepoOwner: repo.RepoOwner, - Branches: []string{pr.Target.Name}, - RepoName: pr.Target.Repository, - }, - PullRequestID: int(pr.ID), - }, - JFrogPlatform: utils.JFrogPlatform{ - Watches: repo.Watches, - JFrogProjectKey: repo.JFrogProjectKey, - }, - } - - frogbotParams = &utils.Repository{ - OutputWriter: utils.GetCompatibleOutputWriter(repo.GitProvider), - Server: repo.Server, - Params: params, - } - return scanPullRequest(frogbotParams, client) -} diff --git a/commands/scanpullrequests_test.go b/commands/scanpullrequests_test.go index e5c4f7a19..dd24678b8 100644 --- a/commands/scanpullrequests_test.go +++ b/commands/scanpullrequests_test.go @@ -143,18 +143,10 @@ func TestScanAllPullRequestsMultiRepo(t *testing.T) { } var frogbotMessages []string client := getMockClient(t, &frogbotMessages, mockParams...) - scanAllPullRequestsCmd := ScanAllPullRequestsCmd{} + scanAllPullRequestsCmd := &ScanAllPullRequestsCmd{} err := scanAllPullRequestsCmd.Run(configAggregator, client) assert.NoError(t, err) assert.Len(t, frogbotMessages, 4) - expectedMessage := "[![](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/vulnerabilitiesBannerPR.png)](https://github.com/jfrog/frogbot#readme)\n## 📦 Vulnerable Dependencies \n\n### ✍️ Summary\n\n
\n\n| SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n| :---------------------: | :----------------------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n| ![](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/notApplicableCritical.png)
Critical | Not Applicable |minimist:1.2.5 | minimist:1.2.5 | [0.2.4]

[1.2.6] |\n\n
\n\n## 👇 Details\n\n\n\n\n- **Severity** 💀 Critical\n- **Contextual Analysis:** Not Applicable\n- **Package Name:** minimist\n- **Current Version:** 1.2.5\n- **Fixed Versions:** [0.2.4],[1.2.6]\n- **CVE:** CVE-2021-44906\n\n**Description:**\n\n[Minimist](https://github.com/substack/minimist) is a simple and very popular argument parser. It is used by more than 14 million by Mar 2022. This package developers stopped developing it since April 2020 and its community released a [newer version](https://github.com/meszaros-lajos-gyorgy/minimist-lite) supported by the community.\n\n\nAn incomplete fix for [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) partially blocked prototype pollution attacks. Researchers discovered that it does not check for constructor functions which means they can be overridden. This behavior can be triggered easily when using it insecurely (which is the common usage). For example:\n```\nvar argv = parse(['--_.concat.constructor.prototype.y', '123']);\nt.equal((function(){}).foo, undefined);\nt.equal(argv.y, undefined);\n```\nIn this example, `prototype.y` is assigned with `123` which will be derived to every newly created object. \n\nThis vulnerability can be triggered when the attacker-controlled input is parsed using Minimist without any validation. As always with prototype pollution, the impact depends on the code that follows the attack, but denial of service is almost always guaranteed.\n\n**Remediation:**\n\n##### Development mitigations\n\nAdd the `Object.freeze(Object.prototype);` directive once at the beginning of your main JS source code file (ex. `index.js`), preferably after all your `require` directives. This will prevent any changes to the prototype object, thus completely negating prototype pollution attacks.\n\n\n\n\n
\n\n[JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n\n
\n" - assert.Equal(t, expectedMessage, frogbotMessages[0]) - expectedMessage = "[![](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noVulnerabilityBannerPR.png)](https://github.com/jfrog/frogbot#readme)\n
\n\n[JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n\n
\n" - assert.Equal(t, expectedMessage, frogbotMessages[1]) - expectedMessage = "[![](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/vulnerabilitiesBannerPR.png)](https://github.com/jfrog/frogbot#readme)\n## 📦 Vulnerable Dependencies \n\n### ✍️ Summary\n\n
\n\n| SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n| :---------------------: | :----------------------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n| ![](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/applicableHighSeverity.png)
High | Undetermined |pip-example:1.2.3 | pyjwt:1.7.1 | [2.4.0] |\n\n
\n\n## 👇 Details\n\n\n\n\n- **Severity** 🔥 High\n- **Contextual Analysis:** Undetermined\n- **Package Name:** pyjwt\n- **Current Version:** 1.7.1\n- **Fixed Version:** [2.4.0]\n- **CVE:** CVE-2022-29217\n\n**Description:**\n\n[PyJWT](https://pypi.org/project/PyJWT) is a Python implementation of the RFC 7519 standard (JSON Web Tokens). [JSON Web Tokens](https://jwt.io/) are an open, industry standard method for representing claims securely between two parties. A JWT comes with an inline signature that is meant to be verified by the receiving application. JWT supports multiple standard algorithms, and the algorithm itself is **specified in the JWT token itself**.\n\nThe PyJWT library uses the signature-verification algorithm that is specified in the JWT token (that is completely attacker-controlled), however - it requires the validating application to pass an `algorithms` kwarg that specifies the expected algorithms in order to avoid key confusion. Unfortunately - a non-default value `algorithms=jwt.algorithms.get_default_algorithms()` exists that allows all algorithms.\nThe PyJWT library also tries to mitigate key confusions in this case, by making sure that public keys are not used as an HMAC secret. For example, HMAC secrets that begin with `-----BEGIN PUBLIC KEY-----` are rejected when encoding a JWT.\n\nIt has been discovered that due to missing key-type checks, in cases where -\n1. The vulnerable application expects to receive a JWT signed with an Elliptic-Curve key (one of the algorithms `ES256`, `ES384`, `ES512`, `EdDSA`)\n2. The vulnerable application decodes the JWT token using the non-default kwarg `algorithms=jwt.algorithms.get_default_algorithms()` (or alternatively, `algorithms` contain both an HMAC-based algorithm and an EC-based algorithm)\n\nAn attacker can create an HMAC-signed (ex. `HS256`) JWT token, using the (well-known!) EC public key as the HMAC key. The validating application will accept this JWT token as a valid token.\n\nFor example, an application might have planned to validate an `EdDSA`-signed token that was generated as follows -\n```python\n# Making a good jwt token that should work by signing it with the private key\nencoded_good = jwt.encode({\"test\": 1234}, priv_key_bytes, algorithm=\"EdDSA\")\n```\nAn attacker in posession of the public key can generate an `HMAC`-signed token to confuse PyJWT - \n```python\n# Using HMAC with the public key to trick the receiver to think that the public key is a HMAC secret\nencoded_bad = jwt.encode({\"test\": 1234}, pub_key_bytes, algorithm=\"HS256\")\n```\n\nThe following vulnerable `decode` call will accept BOTH of the above tokens as valid - \n```\ndecoded = jwt.decode(encoded_good, pub_key_bytes, \nalgorithms=jwt.algorithms.get_default_algorithms())\n```\n\n**Remediation:**\n\n##### Development mitigations\n\nUse a specific algorithm instead of `jwt.algorithms.get_default_algorithms`.\nFor example, replace the following call - \n`jwt.decode(encoded_jwt, pub_key_bytes, algorithms=jwt.algorithms.get_default_algorithms())`\nWith -\n`jwt.decode(encoded_jwt, pub_key_bytes, algorithms=[\"ES256\"])`\n\n\n\n\n
\n\n[JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n\n
\n" - assert.Equal(t, expectedMessage, frogbotMessages[2]) - expectedMessage = "[![](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noVulnerabilityBannerPR.png)](https://github.com/jfrog/frogbot#readme)\n
\n\n[JFrog Frogbot](https://github.com/jfrog/frogbot#readme)\n\n
\n" - assert.Equal(t, expectedMessage, frogbotMessages[3]) } func TestScanAllPullRequests(t *testing.T) { @@ -184,24 +176,20 @@ func TestScanAllPullRequests(t *testing.T) { paramsAggregator = append(paramsAggregator, *repoParams) var frogbotMessages []string client := getMockClient(t, &frogbotMessages, MockParams{repoParams.RepoName, repoParams.RepoOwner, "test-proj-with-vulnerability", "test-proj"}) - scanAllPullRequestsCmd := ScanAllPullRequestsCmd{} + scanAllPullRequestsCmd := &ScanAllPullRequestsCmd{} err := scanAllPullRequestsCmd.Run(paramsAggregator, client) assert.NoError(t, err) assert.Len(t, frogbotMessages, 2) - expectedMessage := "**🚨 Frogbot scanned this pull request and found the below:**\n\n---\n## 📦 Vulnerable Dependencies\n---\n\n### ✍️ Summary \n\n| SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS |\n| :---------------------: | :----------------------------------: | :----------------------------------: | :-----------------------------------: | :---------------------------------: | \n| Critical | Not Applicable | minimist:1.2.5 | minimist:1.2.5 | [0.2.4], [1.2.6] |\n\n---\n### 👇 Details\n---\n\n\n#### minimist 1.2.5\n\n\n- **Severity** 💀 Critical\n- **Contextual Analysis:** Not Applicable\n- **Package Name:** minimist\n- **Current Version:** 1.2.5\n- **Fixed Versions:** [0.2.4],[1.2.6]\n- **CVE:** CVE-2021-44906\n\n**Description:**\n\n[Minimist](https://github.com/substack/minimist) is a simple and very popular argument parser. It is used by more than 14 million by Mar 2022. This package developers stopped developing it since April 2020 and its community released a [newer version](https://github.com/meszaros-lajos-gyorgy/minimist-lite) supported by the community.\n\n\nAn incomplete fix for [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598) partially blocked prototype pollution attacks. Researchers discovered that it does not check for constructor functions which means they can be overridden. This behavior can be triggered easily when using it insecurely (which is the common usage). For example:\n```\nvar argv = parse(['--_.concat.constructor.prototype.y', '123']);\nt.equal((function(){}).foo, undefined);\nt.equal(argv.y, undefined);\n```\nIn this example, `prototype.y` is assigned with `123` which will be derived to every newly created object. \n\nThis vulnerability can be triggered when the attacker-controlled input is parsed using Minimist without any validation. As always with prototype pollution, the impact depends on the code that follows the attack, but denial of service is almost always guaranteed.\n\n**Remediation:**\n\n##### Development mitigations\n\nAdd the `Object.freeze(Object.prototype);` directive once at the beginning of your main JS source code file (ex. `index.js`), preferably after all your `require` directives. This will prevent any changes to the prototype object, thus completely negating prototype pollution attacks.\n\n\n\n\n\n[JFrog Frogbot](https://github.com/jfrog/frogbot#readme)" - assert.Equal(t, expectedMessage, frogbotMessages[0]) - expectedMessage = "**👍 Frogbot scanned this pull request and found that it did not add vulnerable dependencies.** \n\n\n[JFrog Frogbot](https://github.com/jfrog/frogbot#readme)" - assert.Equal(t, expectedMessage, frogbotMessages[1]) } func getMockClient(t *testing.T, frogbotMessages *[]string, mockParams ...MockParams) *testdata.MockVcsClient { // Init mock client := mockVcsClient(t) for _, params := range mockParams { - sourceBranchInfo := vcsclient.BranchInfo{Name: params.sourceBranchName, Repository: params.repoName} - targetBranchInfo := vcsclient.BranchInfo{Name: params.targetBranchName, Repository: params.repoName} + sourceBranchInfo := vcsclient.BranchInfo{Name: params.sourceBranchName, Repository: params.repoName, Owner: params.repoOwner} + targetBranchInfo := vcsclient.BranchInfo{Name: params.targetBranchName, Repository: params.repoName, Owner: params.repoOwner} // Return 2 pull requests to scan, the first with issues the second "clean". - client.EXPECT().ListOpenPullRequests(context.Background(), params.repoOwner, params.repoName).Return([]vcsclient.PullRequestInfo{{ID: 0, Source: sourceBranchInfo, Target: targetBranchInfo}, {ID: 1, Source: targetBranchInfo, Target: targetBranchInfo}}, nil) + client.EXPECT().ListOpenPullRequests(context.Background(), params.repoOwner, params.repoName).Return([]vcsclient.PullRequestInfo{{ID: 1, Source: sourceBranchInfo, Target: targetBranchInfo}, {ID: 2, Source: targetBranchInfo, Target: targetBranchInfo}}, nil) // Return empty comments slice so expect the code to scan both pull requests. client.EXPECT().ListPullRequestComments(context.Background(), params.repoOwner, params.repoName, gomock.Any()).Return([]vcsclient.CommentInfo{}, nil).AnyTimes() // Copy test project according to the given branch name, instead of download it. @@ -211,6 +199,8 @@ func getMockClient(t *testing.T, frogbotMessages *[]string, mockParams ...MockPa *frogbotMessages = append(*frogbotMessages, content) return nil }).AnyTimes() + // Return private repositories visibility + client.EXPECT().GetRepositoryInfo(context.Background(), gomock.Any(), gomock.Any()).Return(vcsclient.RepositoryInfo{RepositoryVisibility: vcsclient.Private}, nil).AnyTimes() } return client } @@ -220,10 +210,6 @@ func getMockClient(t *testing.T, frogbotMessages *[]string, mockParams ...MockPa // 1. First, the "test-proj-with-vulnerability" project, which includes a "test-proj" directory, will be copied to a temporary directory with a random name. This project will be utilized during the source auditing phase to mimic a pull request with a new vulnerable dependency. // 2. Next, a second "download" will take place within the first temporary directory. As a result, the "test-proj" directory will be discovered and copied to a second temporary directory with another random name. This copied version will be used during the target auditing phase. func fakeRepoDownload(_ context.Context, _, _, testProject, targetDir string) error { - err := fileutils.CopyDir(testProject, targetDir, true, []string{}) - if err != nil { - return err - } sourceDir, err := filepath.Abs(filepath.Join("testdata", "scanpullrequests", testProject)) if err != nil { return err diff --git a/commands/testdata/config/frogbot-config-test-same-branch-fail.yml b/commands/testdata/config/frogbot-config-test-same-branch-fail.yml deleted file mode 100644 index 309cd93fa..000000000 --- a/commands/testdata/config/frogbot-config-test-same-branch-fail.yml +++ /dev/null @@ -1,9 +0,0 @@ -- params: - git: - repoName: test-same-branch-fail - branches: - - main - scan: - projects: - - workingDirs: - - . diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/COMMIT_EDITMSG b/commands/testdata/scanpullrequest/clean-test-proj/git/COMMIT_EDITMSG deleted file mode 100644 index b1b716105..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -init diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/HEAD b/commands/testdata/scanpullrequest/clean-test-proj/git/HEAD deleted file mode 100644 index b870d8262..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/main diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/config b/commands/testdata/scanpullrequest/clean-test-proj/git/config deleted file mode 100644 index 6c9406b7d..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/config +++ /dev/null @@ -1,7 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/description b/commands/testdata/scanpullrequest/clean-test-proj/git/description deleted file mode 100644 index 498b267a8..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/index b/commands/testdata/scanpullrequest/clean-test-proj/git/index deleted file mode 100644 index ca79d9fa6cdbf196c5e76e55655e5b0958062d58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 145 zcmZ?q402{*U|<4b#*~`ddB$RT5-^&PfkB9ItK=L8hQ=j8>F+=_B0%haagN!w;xl3) zp9QAr`v0s`-ud5Mnt`VvF*!RiJykEOI6n`l3J5}iTwQ^bB!i)X0hcL{#p{nNw^s{D knMOa!N}96nd-Cz}Kb}*p7s<3f@bz}P@kw|_l&H>109`IFRR910 diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/info/exclude b/commands/testdata/scanpullrequest/clean-test-proj/git/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/logs/HEAD b/commands/testdata/scanpullrequest/clean-test-proj/git/logs/HEAD deleted file mode 100644 index 3081617f0..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/logs/HEAD +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 b7761f99d321222c411d187405cc8354bdd1f696 delarea 1686051624 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/logs/refs/heads/main b/commands/testdata/scanpullrequest/clean-test-proj/git/logs/refs/heads/main deleted file mode 100644 index 3081617f0..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/logs/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 b7761f99d321222c411d187405cc8354bdd1f696 delarea 1686051624 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/objects/35/0c38ebf1a9b77b101a355be46a6294aef763c7 b/commands/testdata/scanpullrequest/clean-test-proj/git/objects/35/0c38ebf1a9b77b101a355be46a6294aef763c7 deleted file mode 100644 index 2465393129b6720eb49c7bbd4c70ff262b95252d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57 zcmV-90LK4#0V^p=O;s>4U@$Z=Ff%bxC`e4sPE1eL%PP*#W4JiS>{{^|v5?OK({%lR P)+z7&?=B4hggX)=Yq%H{ diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/objects/b7/761f99d321222c411d187405cc8354bdd1f696 b/commands/testdata/scanpullrequest/clean-test-proj/git/objects/b7/761f99d321222c411d187405cc8354bdd1f696 deleted file mode 100644 index 00c5c96ef..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/objects/b7/761f99d321222c411d187405cc8354bdd1f696 +++ /dev/null @@ -1,2 +0,0 @@ -xA - @Ѯ= e&@)h+]ZUzLv֘IB$$Gu,<-N4)W.]}{{R =x =Laڢ2= \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/objects/d1/9c36d673cc1654f310962d4ff97e23b9ff471b b/commands/testdata/scanpullrequest/clean-test-proj/git/objects/d1/9c36d673cc1654f310962d4ff97e23b9ff471b deleted file mode 100644 index 41c9f1a4940342d5348627a72bfdfa3685338384..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83 zcmV-Z0IdIb0ZYosPf{?qWT@s+P*BQC%uQ9YQcz0HNlnbtElDjd(Jd&-&r;F>NtUG+ p6=&w>f#ePK%=HW)qA95bsd*`>dC8fn#Xu>LF|}N^TmVI?7;sZhCQSeU diff --git a/commands/testdata/scanpullrequest/clean-test-proj/git/refs/heads/main b/commands/testdata/scanpullrequest/clean-test-proj/git/refs/heads/main deleted file mode 100644 index b9860f41a..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/git/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -b7761f99d321222c411d187405cc8354bdd1f696 diff --git a/commands/testdata/scanpullrequest/clean-test-proj/package.json b/commands/testdata/scanpullrequest/clean-test-proj/package.json deleted file mode 100644 index d19c36d67..000000000 --- a/commands/testdata/scanpullrequest/clean-test-proj/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "clean-test-proj", - "version": "1.7.0", - "dependencies": { - } -} diff --git a/commands/testdata/scanpullrequest/clean-test-proj.tar.gz b/commands/testdata/scanpullrequest/clean-test-proj/sourceBranch.gz similarity index 100% rename from commands/testdata/scanpullrequest/clean-test-proj.tar.gz rename to commands/testdata/scanpullrequest/clean-test-proj/sourceBranch.gz diff --git a/commands/testdata/scanpullrequest/clean-test-proj/targetBranch.gz b/commands/testdata/scanpullrequest/clean-test-proj/targetBranch.gz new file mode 100644 index 0000000000000000000000000000000000000000..57c33cddfd00c7a767217d2d2e37f162cc5f0a9a GIT binary patch literal 161 zcmV;S0ABweiwFP!00002|LxB~3d0}}1yI+XLR>egQZ>-qh#5-KRz*!WC3o*gpsOxJ zA>iBmVZMk)>+bdj=eT7*=itfCgb+q4_G@2BIWTh31_xsVp2I;ajYtb*Q4mDqo}B$xUndMqxiqQO=}Zc{(hd~dyX;BbMxNZ=9kN8|KL#w zg0uub6BP4$1`b#zN6@i6bsk$@;s_>G{=1?_q1 z+p<;+)~-eR8M)CaRjh_js?~8b)TEY*_K4R+d1}abbsTNtsmkd9J)kn4XKYWa`GqUH zE&BDA7g2mS67wDYDJ|SF^)}+n@ldMx_!uqA0l6QuX+vfBFW7vW6qm}d_YbS)g#~=- zTT}Epbo3SvuYVC&4qvH>S0%(~RY@MHx{HY?6O7lQ<4ao5BMp`DykdKhldl|JIT43X zSH{l%z4*+-*!GUQDk2ab$D>whv>wT71*xSC0?2I}``Az!{u?&G#crRG?cFb}`{jhg z#wjt!w2Rj4jg{v$nGbam?eTR^3<@|QIzC>T+s;rKPX*fp1~NKva7OW@6Se)89U3{= zeRM}ZwYv?ogKp>d~DeIu6=ywogg4oYWYnTfhE3 zw-P`;s0{xlo8QuT+h?~|b_<6sKePMB_G{T_`1IySwZK%bImijGM!3Ly83WT2rk z{3bphsCO&aIA$@-I6{qsrZ(N)G%&GvLG z`_Gilh-2Z4;&EYngKK&Qxz?@R^s?!EgE{cfsywJ@nu=8=YdP~F=~U?fJ)kn4cWh6W zk!NlVIFayTRF{ec7aJI5r_UkZaps%7^o;9*m^5LPj!%S~U8LuKYzO$J&zCi8 zX53i6Ir5J^&izib{j2`a+qtJnE2N8&ACsV<({w=C_a_Uc87ed0Cmi0pJg4}cmH$qD z{ZCu>xA@KcmX8+j2*lomr&RIjG%7Axq5ndK2$OR%ofuU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Cq+sHr6dWdLZYNaI4%~7#S)Z~D-3?cKHa`z zh;-@(E5?6@<4?Wx`p=e!Hm#VSGwbOyk02}fuh3~Xho9lNYavy;v(JtWq4~dcUMNW^JMt(8>Hd|^+T;Y| z4h{AN@93@1AQHk^*l~4MebVS2b5j$FsvebI?Y4bW^ToL#$5i9tmOkXVP%m8sjP1AEcobg5mxvH_N^$x2`rNE3gXe9S-=@(cecGv&>+8iR98^YoI-nr_H%PJ|)a%Yku9y!JAUjXU}m_a_AKP#rn+ z=uf-$dj0+1G5ZhZ27BG~OSq<6F$g9Bci{2GW8Q5(gCDJJ^_0l{x!~5&1#^#qqayv$ z#dSWzPLSmD*WLZytOnL+RbK3p3?~K$Yhr9ctI$)K9X?17l+7;7qh_OTW!i6>81>`} z`@2mJ@3p`2?W+6Tf{)GWTIz4?uIra0{j6+v1-@O-rp1Sx33hEoo7#NsuGhVGYvjN6 zxLKd{bNSW!V*Wb8yaMB?3l2rb3cFezIuP_@L-oFu%Syv<`g}dLVB4O;{H+6(i~Ba9 zOY0jdE}!%4^NkZDau#)5w`UGjRCU!YZpGrg_kMln^Igr(tEd#V_&&ZpGwgxOj`+;` zvo!mpsn#Xg*&_X+9)&Yj7YrxW zb(*Pn*GLo)7_e@GL&G003ZfpYTz#!@rER12$nZX*V&8s#7xKm{p0^%z+CTLf(wg^w D7~C(v diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/info/exclude b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/logs/HEAD b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/logs/HEAD deleted file mode 100644 index 33ea9a093..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/logs/HEAD +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 8e42fa779e5d1c955df94f3873bb53c83739b0ed delarea 1686051824 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/logs/refs/heads/main b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/logs/refs/heads/main deleted file mode 100644 index 33ea9a093..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/logs/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 8e42fa779e5d1c955df94f3873bb53c83739b0ed delarea 1686051824 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/00/6ad0541dc967f47aee76cd59e1c6183598a1a5 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/00/6ad0541dc967f47aee76cd59e1c6183598a1a5 deleted file mode 100644 index c50e97cccd68850cc39415a9393584be4a06971f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83 zcmV-Z0IdIb0V^p=O;s>6V=y!@Ff%bxNHI1sPD)8NH%LyjG_p)KH%u`wF-lA_Ff}tt pwy;bwNi$5cut;L?>1y@dH#1*w6TANVjMpg>jp7&R0Ra817Yj839y$O3 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/01/c87b876718ae3180c55528b36d9e98a325c025 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/01/c87b876718ae3180c55528b36d9e98a325c025 deleted file mode 100644 index 01d13d0a3578b5267add2a660ae2c2bcd3204650..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 81 zcmV-X0IvUd0V^p=O;s>6V=y!@Ff%bxNVYUHHaAZ*N=z{_OEpeSN;Nk$w@kG(O*1z( nGB5&)B$}H6RX^8PbYF1h!}e2Gm)kGdG q*Sg^XnV>߁B uc}׵J;a) \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/08/37672d2319537596cef5a302eb3217829aa44d b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/08/37672d2319537596cef5a302eb3217829aa44d deleted file mode 100644 index bcf11e8419ff0b8f1364a704b5b332cd4c9465b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83 zcmb$)J@TEv_h8VmBU2=u-N+i_&7nWUB7FlBnQo z;i(obtRTM6+Gm_lWt1|PF=MD&a#SOYUZ;s6i0y;Mj+|+2!5PsUA)yDXHLY!oW0ELk zh)by3w6Te%pbC*kQDX<75>mO?gCK2mdd=35^TM}og3wK#kXpw1yNCh5}#@E#BmA2D{Is0Jr6u8;P>SuxKWin#wA&o+sPkKhfO+F^O^9$C0QsInxPc^d&q2y+I05 zU@Ct(v OU4)Rel7nBha@t(wn|DV5 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/10/fcf211c78a7f37965675b72ef5887058298f2c b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/10/fcf211c78a7f37965675b72ef5887058298f2c deleted file mode 100644 index ec48be88dc2be8087c699887c7579b6f51b9dc46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76 zcmV-S0JHyi0Rce(zW-uuZ(<-dHvo76D=A7%RWLDNFf=eQGci#pNKDR7Oi$IzD$dVi ikXYW7{CSD|V$P6d8+n?{%kJ-ZFdqPS!xB38_Zq|;4K)FQv^(A>uh0(SSg!aqh@r53i{w`%Ir2>QYwl*>p3Q{>@TLMQ+L diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/4cf0187c0f45b6a6a6ee102bfa91aeef4cc0cc b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/4cf0187c0f45b6a6a6ee102bfa91aeef4cc0cc deleted file mode 100644 index 16dfd793b9f5bf190b895f6684bf00f032eafe78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47 zcmV+~0MP$<0V^p=O;s>9VlXiP0)>p!#FS!&r0%QUwaKj!j-A}rP30G#>?+*X3IGLc F4@J+A6utle diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/a78263f3a41fa30954a6b10c823776dfb8e09f b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/a78263f3a41fa30954a6b10c823776dfb8e09f deleted file mode 100644 index 9487da2f9..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/a78263f3a41fa30954a6b10c823776dfb8e09f +++ /dev/null @@ -1,2 +0,0 @@ -x% P -g!mыӖUjbL]μ9 ޟ>1SBH{ld۰6Y Kj׻ܐBX+Ԗj/H]Fw7&Z \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/e5cedb4c64cc1599e43f345f658f658a2cc4bb b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/18/e5cedb4c64cc1599e43f345f658f658a2cc4bb deleted file mode 100644 index ab64bc15d5b79315e39efc01128c70f775de90d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76 zcmV-S0JHyi0Rce(zW-uuZ(<-dHvo76D=A7%RWLDNFf=eQGci#pNKDR7Oi$IzD$dVi i=vm|cXqkRQZTQv9)qfqIS7bh#)(-%R7!#QG<{BLrgdV5> diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/19/828baca3d92975c5056559c81ba5be93d9da54 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/19/828baca3d92975c5056559c81ba5be93d9da54 deleted file mode 100644 index c4a43d582a60c348fa3e119f5a4c3db8681d5c26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 79 zcmV-V0I>gf0V^p=O;s>6W-v4`Ff%bx@Nji>VW>Ru&E-Kzz256E5q}NglN!4_FZP=l l0D(eLYFaUagwF?w8h+Pp%a*+p(Ec@X-Fu${X8>Wp86V=y!@Ff%bxFfy<(u}m~cO0q~aO*1yPv@}dgPE9p6GE7Rd pFi15pGe}HLN;PEAw*Mr)PoZJ8-H{XN5f?;vosZ*-0|5Od7kW(}9d`f# diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/23/63d921c26161f1c010f3df560f2cb8874824a8 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/23/63d921c26161f1c010f3df560f2cb8874824a8 deleted file mode 100644 index 3142c46f61b4d8efd08e746acb59e4740fa4741d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49 zcmb9wq!6gFfcPQQE>M6_4N#icXja$@eOuo*tlIxAasJO_a7f7 z_m7hoICOlTQx8??;p*tZu%qCHn$p3Qr?O9dy`Ma-!O2UKWdl?`IX^EgGo2x43fuOZ zM!XxE-z=ML-~Db@PIbT)sEU--;^d;tf|AVqJO74xZVg|{k?lp^VYL*^l zO^rMuy>#E?o3}zB()meQsmUe94D)p}y!M_7Tcq>KSx9gf;_MX71U3}Je| acs9)uV(*{wZJD~1c=un;Jre=Wc8Dvln5usO diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/23/e856f5deeb7f564afc22f2beed54449c2d3afb b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/23/e856f5deeb7f564afc22f2beed54449c2d3afb deleted file mode 100644 index 1f7c30fe3837b10dc714010bb80236230d014393..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1972 zcmV;l2TS;P0i{@NZyUK0?pNtoOx6M<1$y!Minfqr_YTS3HO0X(^3oKDa>8ntk~UtE z>m@ge;M4u~duGU$B{`0b)*oz%oEZ-1<#~pl=4MKN{rkz^{&MtWSlMzo&GfKPW!`L7 zR*`jOmbg>-yoyVm>ACgaUS2*Qjb0T>pPV+ENA#m6^(9^wxuS(JS7ehiD;zmPnRaSk z#!k`u*d>c)tRdc6I9J%wa5#$-HHE@pp1DOe9b{&>3Sz@9t*}Vg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bJohNz@t55W zbcY~=@9#q&;sJ}tU!1SvwGFMf^BlzR!x%BkO1wNhW?Qfm^usVCyZkJT6kZl<@GiI( z1%ncD>xgD~4C=*11%BlE15QCh3~U|nW+$?nak5|%&pu~qg)x$e7>p@(x;NL$L@0Cpw^9ww15o+Da_w{T z)dxZ+8b)27!1wu8*i+hl`9VlXiP0)>p!#FSzNt6S_7lQv3S{$4cw@wx8@^d}qCuLb}V GzYu?}aT84d diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/2b/3ff217be2080ab3ec4c86758d015bacf5e0e5e b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/2b/3ff217be2080ab3ec4c86758d015bacf5e0e5e deleted file mode 100644 index 3e70859b57906bf6bbdf5eb48c7cb5b949d22a0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 63 zcmV-F0Korv0ZYosPf{>3W2j)%*7WiXH84vtFl1nAeRN4hxXpnvR9VlXr?Ff%bx$W6@5W4Q9Mq0T_YdfEnU>v!i?7qNHVj-3Di H3?L6t+gB77 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/41/42082bcb939bbc17985a69ba748491ac6b62a5 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/41/42082bcb939bbc17985a69ba748491ac6b62a5 deleted file mode 100644 index dba982899e55860a4eb9fd52adc3deaa74d41f11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 281 zcmV+!0p|XA0acJ&P6IIvMfuJuF6pQOL0Wamv=Q^!XXiH1wk zg=vZz}Pal`Ndeue!ODiC}gn+foU}Oq=ooe=^kN1UoO^YsFL< f<^bLNA~fc6c>uNl!{+PhK{s#uTfL|spbC+Vc>jt5 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/48/ab0354c18809f637b0df7cdfa5637c31ef5074 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/48/ab0354c18809f637b0df7cdfa5637c31ef5074 deleted file mode 100644 index e742e87926a4eb096b09444ec4feb82c19f96e5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 328 zcmV-O0k{5m0V^p=O;s>9wq!6gFfcPQQE>M6_4N#icXja$@eOuo*tlIxAasJO_a7f7 z_m7hoICOlTQx8??;p*tZu%qCHn$p3Qr?O9dy`Ma-!O2UKWdl?`IX^EgGo2x43fuOZ zM!XxE-z=ML-~Db@PIbT)sEU--;^d;tf|AVqJOBn7pbsdEe`EnmIjfYi_Ol;3)HH$vKFMqSUlvhQ`hD a*~S9An>YBz{QS7Kx9e)eWk&#e2#Sl6zpO+6 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/49/8b267a8c7812490d6479839c5577eaaec79d62 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/49/8b267a8c7812490d6479839c5577eaaec79d62 deleted file mode 100644 index b558235fa77fbc9e56902bc61148d32e42a70755..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0ZYosPf{>9W(dv8OUzA8Q7B3+$S=+;$uFw3R!B|BEKw-Q$ShV!%gjkt jP)|uMPA9Zjg diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/4a/939517f9bfe9ab67dd8d90cfb58d13fe0f4258 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/4a/939517f9bfe9ab67dd8d90cfb58d13fe0f4258 deleted file mode 100644 index 837d21ce00c1c86d63dd8273056d1390351a58da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 80 zcmV-W0I&ae0V^p=O;s>6V=y!@Ff%bxNJ&miN=`Ph03y?*lw`ByWJ3!hAWAY!Ni#A| mGD}P}w@683IQ{kz)8?5y4fCs?Jk@>FuxodC>n8w8og08CR~|tC diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/4c/77be157a8e72e7ac5c7452d15e65383c89bb68 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/4c/77be157a8e72e7ac5c7452d15e65383c89bb68 deleted file mode 100644 index eff215d0a064a43479bbdad86f897df83ff6f542..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 180 zcmV;l089UP0ZYosPf{>6H(_w`402{*U|<4b#*~`ddBzGSPQqwL1_mL42BAZTpkK7v%GgK{aiV5&$}S$AAD?FuOEW603{8$0tIxX*fo5!{O|mlas8iL is%f~)Uha9@{rKbML>=xsu87;aYFltshX4S_Gd|TU5Fp>(CTHr{hwbaN zh>vI1cOjGq9-`Q5dva zPq!S*`kwkmCo++A>AM^+nc6NkTrY_(w6$DQc~8a0B*4i@L3*7ykV(|&NL9nt4KAgI zDe%@OrkHf<;vtnlEP3q%lXmy1F>aHel+11f%V{pxcnuCCIleO~Qg2d2nw)owpB(%M ziv57o8*2f+V$zQ7?M6fp1Y? z)GFL+PkSG3glQZ6Cg9@1QmG;TSur~{Qw@OARn506*ForClmg8^A1z+$#rn&f=121brC=^* zD6p=<3MzayD~t*?L7h%bCR2I~`H`Y# zi{3=!m71`Pvf4xJu^(XUK!9?^J(WSbsyWP)5043xuoD+(6P#`svh4XFI;H}`bz5r; zF$}^W#w7juFQ7w`(XGD$_w1I-hv;jgaB)f(^0B}u27-Sh1P%tQ(H?Zg!Xhy(9LZ$D z*p}vB@n8}= diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/56/2efa0cb29c12078f94f6a6271a178bfd29bc91 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/56/2efa0cb29c12078f94f6a6271a178bfd29bc91 deleted file mode 100644 index 6bc3820d32b8a57e09ba688fec911147b49592c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47 zcmbAGDSS5fyZN2_X67lr54joG?fAU_ DyXg~r diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/58/19fb8cf31384f08910df4571feddcd064af02c b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/58/19fb8cf31384f08910df4571feddcd064af02c deleted file mode 100644 index f02a9c7a7e8609e5f5e112a7e3ed3e766dad8cd0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57 zcmbdm!%aSZzFuY~=4M95rl#8rOiVU;82Naa Nct2xeu&d9wq!6gFfcPQQE>M6_4N#icXja$@eOuo*tlIxAasJO_a7f7 z_m7hoICOlTQx8??;p*tZu%qCHn$p3Qr?O9dy`Ma-!O2UKWdl?`IX^EgGo2x43fuOZ zM!XxE-z=ML-~Db@PIbT)sEU--;^d;tf|AVqJOOhD`~T)&J#Oy-kO<6E4N~eBm1M5HC=7fX2Q@%q~6s4vWGi)d> bbla&mZ{1#vV1Nz&+t}tx9c~yM v#+k5iC0A?%MG9k`-=cfg!(Vf=FP>f>vkHdJcJ={0In}9tUfm{Tg7-Ty$Cy8k diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/60/7ddb4e7656129da6f4bdbbc769fa04f647a403 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/60/7ddb4e7656129da6f4bdbbc769fa04f647a403 deleted file mode 100644 index 9d6644f3602a695d2cefe3620dd7edbbb75007a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 91 zcmV-h0HptT0V^p=O;s>AVK6ZO0)_O<5(ec}%=Q%*f^r{!O^iSO)MWnSz21q21_ov( xCJIHVg{7HAsky0nCB=Fr6(tO*CzH!RtyO#c`nmYLso#y59=|F}0|5R9VlXr?Ff%bx$W6@5W2ijw&E-Kzz256E5q}NglN!4_FZKff H3bPLS#|;zT diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/64/ccd694a0965a2c7f958005fe2d8360c18d94f7 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/64/ccd694a0965a2c7f958005fe2d8360c18d94f7 deleted file mode 100644 index 05bc0814e460709d4eea031c1f2491d05e31b702..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96 zcmV-m0H6PO0V^p=O;xZkXD~4U0tHh;hSnnY)oDW764%vUX<3Q<%duJZ`5#2mBAMam zvcSW@=z$7sE|wjb73&%sOtf!|_U`Ki U?AIJ_Y5s+)Q~BHc07G9gA$trp-T(jq diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/6c/bef5c370d8c3486ca85423dd70440c5e0a2aa2 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/6c/bef5c370d8c3486ca85423dd70440c5e0a2aa2 deleted file mode 100644 index b098b0b66e206a72124d32206debad73e240f4ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2176 zcmV-`2!Ho@0hL($Z`;Tb?yursF{h}tlCB;Yhx@e zWu`QQ*14r9WUSEE&`Rai8XM-g{#7lQ)WrG?_S= zrZ!efQMwx=buJBUg&|n<5xN)>Hlo2IE?8<&r5o7HdcCzP8Y)e)tnH4r8(I0s{N7pD zXw8=Tg`)@?4m6^y3rS|9wgz6^l2v=Zs5(!>8bGoeVM)Nrq5#^}4v*~jG=-(S13YX)b+asTv%x-_+*qY|(Q_}l>|bvkKJ9O zV414;J*kXJVPL|P=%qn^(Cc3~mOfy(KjA&jm5aR$DiQjkaCu?y-Z>1kan73jcW>v- z4Sj({=|<7BzbvT#3MtbtXFYX;JA%#g&051a`XQ$U_DQnZ9R-t)X>j`H$A7;&ygUle zOS5JVKaLU`v<+@$-0PzC`#f?Xj}`st`>G$*4FBALK7zth)SSM(-t5Eh-QnbWG086f zI-(iN_lD?P$Ioa!;=5Zib&=cQ?0q#G2YB;K_X_Qc7`rTFNyApowI1Re%5BmJPlu-S-w@gZX7}VUNY|J!p%~zQ8b~{{FV5o-6iqm;FEd@c#Vu z+0~0z=Sgyb9v7Rkn<e(vSGPS7bphRB9JIo>9+PAH{DF!_N<5*-I0 zGC5Cc-feF&)VOBBT_M`)<{mgXkioA`H=NZvvHQR9>rZf<9jG#;05qjEZe%(^FMt z`MS|!iIEg9lfjQKFRspCzM1(qz{+8mIocn=@Mx@c47DPxyQepn` zam*($YbN?9ALc-I3?>LXvLVPGH{B)xfIMA%@L=Na^v9HFe_T+Hs|8e*=UGn zzY#Tf>=}*I81jZVc}9pGPDUGFfuY&052Yr8Kp_4h?SY|!55+j6xuggg3hwuMAds3& zCV%)1S?X5In0ENY{|~NNieCz7=I@eDS?2Bn2(e68$ya3f5k65eg|_xf&;3h&pRgr- z(fPUu?$7)7G75I(mJZ_C9mycq731su$E%z4W}ExdCQ{(pGsnp@Q0qWps)P_04HBQ z|HC7^tE_NB(qb)>=MOf%;09gR4JLM!ZYHt+VJ95+;(6wS_a=9&Z%Bk#IthP{KtfB@ z1!VR(WI8*)V<6@h7T=rK1+#bv#yfU8by$ED^}uByyy||BiACVsr7(%(-~Rym!v%V@ C_Bz%8 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/70/59c9ae1159581daefeef8fdb1152ba7b10d549 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/70/59c9ae1159581daefeef8fdb1152ba7b10d549 deleted file mode 100644 index 09f76180fbd452d23caf548446c5b4e2bac0ca88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 79 zcmV-V0I>gf0V^p=O;s>6W-v4`Ff%bx@Nji>VYu?Kq0T_YdfEnU>v!i?7qNHVj-6m) l00as}scFRw8vl2w@Cq;YdEdy&_-($w2%E`FRsdw+7~(V3B#Zz6 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/73/ca9e6c4904275d3c8b761f07fc36ccf3601f3d b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/73/ca9e6c4904275d3c8b761f07fc36ccf3601f3d deleted file mode 100644 index 0d32213571bfca6a70ac9461f50bd9164ec20be2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 448 zcmV;x0YCnD0V^p=O;s>6G-oh0FfcbYRY)u-$f+zyEJ@DL%`HyXD^AQU$Vp{bdVPmi zx=F-E-&w0U6q^@L>(MEh1l5q7pPQRmf~g@{6#q_g>eBdHqrPwC`<*%N$*+-%w2j`Nbu=r3ER8C8;pg zZ^Yk7T5do5BD-eWfg|^_IV6@pkAtZ$O4UVp0;a*yi9`GJ4;S1x z?2)q~MEP!k3r`%E)*=+e$*GxTaMcU{YQ7O^vh6;y;^Lz7k3#|@_yZ*nstXc4C#u4XiG&eM8gD%|~3@wIzR0!$Oo*}5h9y2%--$=Ug(B``0nkK$pF*!uE-ci5Vs qPtv{`UwUW0f@(pHrz2O?_T;^E=6l{~lzc8XcKMr%!^Z$~N%#KM;M~Fh diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/79/c8f644e0547f2eeb56144f2813c928bb89d18f b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/79/c8f644e0547f2eeb56144f2813c928bb89d18f deleted file mode 100644 index e18aee3567bf8b08151cc55a2b6f9c72e614ac12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 118 zcmV-+0Ez#20ga473c@fD0KMuf_NWN5n>5=*MEuHTvz16{p!DMJtv_&1!yG2Jo`Ht6 z!#{z9k<R!g}#f&c&j diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/81/b35f6b33100db3b04d5cf9f1ad8d8ad558d341 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/81/b35f6b33100db3b04d5cf9f1ad8d8ad558d341 deleted file mode 100644 index 5ee2cf0fcf03c889a5986f048c72e458fc8b15f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 48 zcmV-00MGw;0V^p=O;s>9VlXiP0)>p!#FS!&)eBc`T{c%etxf5tVdwXs&(9pwlLr7E GhY;JbeG~Km diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/85/7247ab66122b18d726ea2a3a14fe6c3ca6f3fe b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/85/7247ab66122b18d726ea2a3a14fe6c3ca6f3fe deleted file mode 100644 index 2a19c8ade4aaedfc2344a996b1cf3e7e297328b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83 zcmbFfsStw8h8BV55(rk%_OFsnIqMZ%-2sQ;$s^ nhF(Tqrk+VZtnKSxx=i*L{-K=XD;^!P@n_-klS~Z1AU@$QN0)_O<5(bae%pnImIKP>1xLyI>`+yQd0|PS? s6NQ4re7`ya%vsjCptRW@DAcrQWhqub{dg83R4Cii`B6Ug&n z4pm5)LS?qjk+3ocz3T#t&q^dVC0_$ZG4h$uKA`9(Lj^ASm96OQRY!lEa^J5&AqMmm Yt%D<;5zVseHTA#Bw0E242jN39R*`%-6#xJL diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/90/96f772441a7e776ebeebe0d5ce11a2995f608a b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/90/96f772441a7e776ebeebe0d5ce11a2995f608a deleted file mode 100644 index c056639ec446ea2094839021c522842bad2054fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmV-n0G|JN0V^p=O;xZoW-u`T0)^tzBtwQ3K~qk!>Y7gbzdP=Z=fktS^>Z~I!ljKE z5^8Vzm4yk-UG`<~?&F!iSiZS0VTMZ^Gwg12`!MT>+0M_*Pb?QqUwy@6F=cS^402{*U|<4b#*~`ddB(D8TVXUK1A`FbR>{Q-42?^G z(%*q7G-EI^00IR=3x?Zfi#o#YDlg9MxLsYm)}oyM#JqVBNfQeO zsjZb0w%Rr&?fiG6BiFflOL{G56GYO~km1nBxu-rW%wJ&4UnSZ0I&gAv?9GV~N%Is2 eugO!zf9`*|I{j|%g!5Z_h5zw8MF0SuCo|I~)1%n1tz!g-aolW~K~` zC#u`iCDs`>91YdjoI7vEV$}nx5J^h|hA)XWJNuTevAVOxZQZ5?K~|UD^UebRZjL2v DG`cA= diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a1/fd29ec14823d8bc4a8d1a2cfe35451580f5118 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a1/fd29ec14823d8bc4a8d1a2cfe35451580f5118 deleted file mode 100644 index b72c5f771..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a1/fd29ec14823d8bc4a8d1a2cfe35451580f5118 +++ /dev/null @@ -1,3 +0,0 @@ -xuPMO0 GV1lc.LEB`ĸ!Mi*a]R5!;N{+t;̍z-:K zQ"hEcRK\z5\~/7~ڑ_h|PMnXf]RvTVh$mSԄׂD+dUF\%Z}VJ{nPA@S"[z2=̧wv~5}IHLv,nu"CF_?dDг 9){e/,$axZugm -(jc~[+9%.N"s<=V -~LbYeM$ \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a5/196d1be8fb59edf8062bef36d3a602e0812139 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a5/196d1be8fb59edf8062bef36d3a602e0812139 deleted file mode 100644 index 62de872c7..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a5/196d1be8fb59edf8062bef36d3a602e0812139 +++ /dev/null @@ -1 +0,0 @@ -x-j0;)< SJB@A ۿlI_Y쑃޳S)|nѶYoe&SWǭ5r:EVfC _Y .Zu\\Tz"GdQօW*)f<=ƂD%ˣYSC \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a5/d7b84a673458d14d9aab082183a1968c2c7492 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a5/d7b84a673458d14d9aab082183a1968c2c7492 deleted file mode 100644 index cafdfdb17e9787527c11fe6accc32992a7eaef93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 299 zcmV+`0o49@0acJ)P6IIvgn7;>OuDK-kgbrAKuAb%2QHA^dN)z?r`Std5O*i(wxzt< z<8Q{(x!A$u)AQBhdezymA|n=J0q+5Dr+sn=CdLg=pKW5`2))6618flb=)GldaRiS< zdPHEo!2sR95OhjzpEUOdh8#WULR4N`cM`V;qmKfb9Za0uy0{kP*0O;RgZjc8fmriI zpa;ebmT0nJEV$Vt$CRyRJW;_8PzgFP)wsklU8HRR&W@HU!nwG`b(P|}99}$jdTOu^ zk70`_=&qE)#?m48J>)X-$4Qk|l>GZ%c^YLaL<^&3MMe?wl*C+K*}clt!8Zn-Acho3~C3mIU^)2m!&xD{|}q*hdbH4$sh3|egWDEqwx$qkTC!N diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a8/5294c8052d3596ffbb5edc49e1cd0d7f9d28e1 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/a8/5294c8052d3596ffbb5edc49e1cd0d7f9d28e1 deleted file mode 100644 index 8b4e8f8488c3baa3735c9e1d49e719232021530f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmV-c0IC0Y0V^p=O;s>AU@$QN0)_O<5{4-66JI{&CZ&oue-T*{a+l*z=8k+r0|PS? s6NQ4r9VlXr?Ff%bx$W6@5WB3_o(o)N;BQ4@^`d6#Ja!AY7zE%MC G5e?9|kQB`T diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/af/5a0c0018b5e9c04b56ac52f21b4d28f48d99ea b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/af/5a0c0018b5e9c04b56ac52f21b4d28f48d99ea deleted file mode 100644 index e05e3b67a8f1ce8742a6596fbf601296af3a3ded..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1338 zcmV-A1;zS!0fkmwbK5o$>}&KZE{dnMJElB#AKFQpbR5SW=b<0dy3_Va1CmD(H3=~I zkgRt4-@6Auvf}YHPqs*4aksm-U_IEHF24TetIu9MKdZGl^Zji0f-Vj5y&9*1skioy zeB<;KC|HV9s{)gvrsw94+sZ~fcg$oBp00GDDf)gfdjXi+Ui%DyzuK%VHc-8lRh8q0 z^_r_mHFwA7C$#C=5OzCOP4IFQRsloMNSU^r?6II@$EM+9e*#eKk!O?jI#{!4#r|YlzJB}o9$Iz`!*vq)^vIm zoeCNptd-NM264djESzC;KK8xwfmNHidAp^SI~9j;NL1?_?dm!7q#_?z&%L5P8E05}Ni0%qs)HypQ#C@*-C_1KY8#|6VyvkbCHV8Za zcRr0OG(A9MSplUCaw^ZZq#T##!K2OV(`v&TP%Yx3(V(Y?R;f3K$`dd{8b3>yy)dugD0eV|6kh+5Do^6!cOha_M8?n~12a30+GH_$` z0ozMc+q6Epi_r69{ZAINRx=%+&_Al4)GIZPgs z)iB}St}zilidmp;c8^v9rIKaqQN$5 z*lS$c_$b3to2}%c*bd{xP9iGzB?TR1R?T6=q-^MUx~GE$gTUxMTd0bda-hqY;B~CLU@6T35+L~;Gaa0$Ms#>_;_#HCB-0GQKTi+Dtrmx zu>>N5RW%J94eH}4kUKvr<#~OJXp)8&u)Ewg@1x%UQGs&X)Zxs%-JY+PZS4-9C#m+6y;s7E|3aXT;Z zaU@?XFv@o{mynp#OS=By=i5J*x4&FpFMqwcJYU{i{~;8mVN@YCKo#dqxp;Hd^7_og zVJJll_G^Kf@!)y(Ed4$@mfbk9uWbDnQiQ7V$yQZ9KqmTjk8|<_X+@DeX^jHS?UU>s w$$@zDX%3%aaBqdjsWm^!*WdgQ_sYhhO$kyy>JE)7PL*^|v`SC^0XQwZ3&gjQ0ssI2 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/b0/737146b9269eaebd285320f1d939a2a3b3588b b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/b0/737146b9269eaebd285320f1d939a2a3b3588b deleted file mode 100644 index 472430848054a1a9b838da3e2e0fecec719c561c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47 zcmbU@|L2;~bfdHwI3PI2tDpB`}kZNs@?N#kvcX!=# z2=C6U-H3n?H&HU4`43;5);h(@S1+E7pT?Skk)oml@JP|ZH;b? z6poIOAq#i~p&UDEKGm&vW|blO>cmsBW?kzC?#HW?^Wh1I$B^(nm;@^%yre|R5M9N$ zKKBxaM_js}_*E|z4qj1X%WxI&<+bt?#?%|6#HM~vLt={uxbsp!cg=(5Nq|o`L@x9z%<+64vz diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/b8/70d82622c1a9ca6bcaf5df639680424a1904b0 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/b8/70d82622c1a9ca6bcaf5df639680424a1904b0 deleted file mode 100644 index 2c626bf20575fbaea7bd87fd34162320dada68dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 rcmbsLZML%D868hin?NQBrK@5N7`T78Z Cvl8|I diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/be/395946f46e946e096ecf4f31bf869d54ac71e8 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/be/395946f46e946e096ecf4f31bf869d54ac71e8 deleted file mode 100644 index 6b03a800e4aad7336a13a80e5bdc476a1e0cdc9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49 zcmV-10M7q-0V^p=O;s>9VlXr?Ff%bx$W6@5V~CLa-Sb(vT&ch9nUeb4~_ H5N{9O@mv;9 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/c2/f19dcaf3209fa0330f7a1986eb5193735dd991 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/c2/f19dcaf3209fa0330f7a1986eb5193735dd991 deleted file mode 100644 index 8c51f8f95013ccd7362d303bf8765644e51cc579..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 82 zcmbrU@Wb(U|fyG;V4glZ~8=3$B diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/c4/d426bc6ee9430ee7813263ce6d5da7ec78c3c6 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/c4/d426bc6ee9430ee7813263ce6d5da7ec78c3c6 deleted file mode 100644 index ad94907ad6d3b7382b31aea21511f3253e3398ab..0000000000000000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sb!Vkz1N8JP&{lNvkE(_&_)MY zcH_*Zks*=8_pyAe={yKPE#?Ro&nS8lIz_45{90@}mg zKZ3M&5WxWOM>~~lHi@u00p9*EfBnYQ&bKM?Ibn;s@p;opTY*PH+?NX>>jhpOYfI}_ z6=~o*>z%Byk|99L)Y!JPU8PEVdxY-$&(7Zp-J~dVf|=Ke_6{iVRK$ ItC<3+0Nh#>6aWAK diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/cb/edc202b3998c809f7be4e52de280babb5785f2 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/cb/edc202b3998c809f7be4e52de280babb5785f2 deleted file mode 100644 index 50b64293f532af91360fb905aa7e44091cf3cb19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139 zcmV;60CfL&0ReyjfB#}^Z(<-ZF*yKu0hP^53IZ_@MN!9DMdpH3b>|BrZl#ib(MZQY zhy!!_B?5IyGB=ngh@#EEG%>lTr{{Rv#m$4A_NJ2?TN^NMI$O`Rqe)*kwTU t6<^sm++St%$0hf6)9ivH%g%Xyrj|JEr&N8{sebH)GJ7S(IgMQ~J+%M; diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/d0/3840cb4e4cab5bd0526dce1e35e2ed0e8fd0d6 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/d0/3840cb4e4cab5bd0526dce1e35e2ed0e8fd0d6 deleted file mode 100644 index a6246e38323ac983431e1889beacb63dd2badf79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49 zcmb`Gu4xv3_`E? FB>}&J6W0I$ diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/d4/f1807e301c3b96b02b3beeceab720789db5d90 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/d4/f1807e301c3b96b02b3beeceab720789db5d90 deleted file mode 100644 index d658863a653b5fc6a6ff4d54cc80bebcb7a9b4d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 116 zcmV-)0E_>40gZ@B3IZ_@0KMuf`ltxfJxeEwh+pX?BazGmhPn8A;}0zAP?VOcK*M#1 ze*(eXM9qfS9Mz4@D0WRHpSoUIBt#eRRAfy8_wG_`4`np)1A3z)#M`8|e#vXCs W?wmI`<|S`g%IOBbI(z|L!z%_Rc{T|E diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/db/36a28856dd23a36d88db7b73ad38770fc89e9e b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/db/36a28856dd23a36d88db7b73ad38770fc89e9e deleted file mode 100644 index 85453052494bfa0f34776ad6ad79a52cb0b1110a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83 zcmV-Z0IdIb0V^p=O;s>6V=y!@Ff%bxNHn)FGBZvyPBbx0OEfmHG&M;yOENS_wlFd_ pH#bX3OR`8cuuNl^(tb;So=5)-kxASSbGg23EByENB>?mN7~u_h9*qD1 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/e1/44712c85c055bcf3248ab342592b440a477062 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/e1/44712c85c055bcf3248ab342592b440a477062 deleted file mode 100644 index dc915f89296935a5940af0fa2d7ff1cf2b97cbad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 950 zcmV;n14;aN0d15)Z`(!?g?kl$#Y8sj7!YMUEqZVx1A^%#~+Sfofp=fhbBA9j%e+OpG?=cOpVAR zh0@zTQWV;v2yuii%Es^2Iv@KUu>}kHSaXOpR&c=qEknx+L zV;94c=%G1OX=G?CT;?ZSnL=Iug}qRSCJv}qNA@Tj2J1Ft9GSlN(tB$nQ^z5g4U?^r zLo*l@P|+buPZ4ECiO`3D2O)N*K#Q?KC)($NJU(^Pm)h!?(7gAYk2mMbEVDIfN1nHN zZ+u|N^U0LoZ`Z%l^?AkHb2qdty}3TQ%uv>4GqW+)g}Bm?jN8E3?1=81jn=f2sw=8& zUDFh)y>ZvaJw?w;|)-Q3_^+rEJ*qf?nHr8Z?RakN!Rnu)10h9Hd@6Isb!?VBTs?`4>7qkpDHC5#8VXy}rL+ z-DuN!MW-Jq|M%0!i&OeayOQ$qOl`cFwyVTY-oE{K`|h{w)_d_+w8lGx?Mcv7>fKA= zNtIxi9~Aczt5zCy9l!zmF5m@uu`@gIkKE+Yll12ay~ljWO`F|Rn`1TlwJL&@~T6Qq_^Sn5tJa{D$6LnM$SeF{s*&=ZxW3m8lQ diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/e7/905292c5e1159574427f6645c8da60f64a1909 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/e7/905292c5e1159574427f6645c8da60f64a1909 deleted file mode 100644 index fa259a90d73d879d7ef9563521d7ef02bbd21400..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57 zcmbgf0V^p=O;s>6W-v4`Ff%bx@Nji>VPI+2E7|+UanG)`4AVmY6;zxTD>gDQ l00M=g)U;xTRnjG?3C;}i=F0?@{p@&o%z9V89{@{P8P)H9B0>NF diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/ec/17ec1939b7c3e86b7cb6c0c4de6b0818a7e75e b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/ec/17ec1939b7c3e86b7cb6c0c4de6b0818a7e75e deleted file mode 100644 index d7558de5f..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/ec/17ec1939b7c3e86b7cb6c0c4de6b0818a7e75e +++ /dev/null @@ -1,2 +0,0 @@ -x-K0P9E [rK&0H -Ȥ&7~]/q\!vyrqִ0&א &HʉAHGp0ZYosPf{>6F=cS^402{*U|<4b#*~`ddB$=V4#H?g1_mLdEBtPixg4zkV)0Z|Zj=rpK?!(ijAaQVUBni&Aq_^Gb^KN-9bi7(#+v zU4iN)84MK+xHK<2?|sg*QuDYhi`IrPpUx{EcXX?>J@cN;vb&Ohqp9}$Hsg+iYqZt_ I0N&m<8$p>y%m4rY diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/f4/613cb98ea7ac3adcb446aeb2a0523ad3476ecf b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/f4/613cb98ea7ac3adcb446aeb2a0523ad3476ecf deleted file mode 100644 index c0fb4e2216ba487900c9f8f696c85478b5707d7b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83 zcmV-Z0IdIb0V^p=O;s>6V=y!@Ff%bxurN$EGBq?aOiMO5OEI!cPEATSG&eRfGc`4~ pFf=r>NHR=HG)ra>Tc8^ExNMV^@P{;;`}y;(?CQ9u0s!S)7o!Z;9-IIG diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/f9/5e34847d032c1b1440cbfa854f235484d58e85 b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/f9/5e34847d032c1b1440cbfa854f235484d58e85 deleted file mode 100644 index 234a9fd6460e8d9d5bad2be596ca4a446b6417d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 54 zcmb6V=y!@Ff%bxNK7_KOEpR~GfFeHFi$ZBA~Vaxq_h+h!&Gx~ n3p2}9BTF-jG={i)F>)`sKPjE`vWv_M_HD0qRLcSY2?!R302~|U diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/fd/9f6fa59134f2900f583d35a3387a064e0b661d b/commands/testdata/scanpullrequest/multi-dir-test-proj/git/objects/fd/9f6fa59134f2900f583d35a3387a064e0b661d deleted file mode 100644 index 6602fc3240629a2dade2e367297190cc960c5cda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 140 zcmV;70CWF%0Re#ke*a=@Z(<-ZGB5ym0hP@`3d0}}K+&!}#q0}ZCdNsGQgW41$JP=n zh+Xvd%@wl!@c6OSS_Y6?E~Bf0pM}>PtY@8+Ex9nc5NEPJS&nfLQp}2MwM(2*R2ESTL)9 z6%^=CH=sX56jLfmuD=vk|0*cd-~6zWCc*Eo{}Ksl^{;}}`bWxptNI!al2Lf|cbM@I zj1}u|j(z9#Czx{L090N#i`jDh-_-zcLltQEK5&;z2KQcOFwt@1kHX9bLj=)TYF9@( z?CQ|-bz-uzs!VF&hkl?^?@eY+jWx@yP0qMK^n0`VATxFeB#^r%rU^`^>6PEH*8dqjfBqw88DQ4`E8)i7o6dE|d89n>_z*k?bFwt&mI=g! zV-vFHkC&^mb#!zv|C^QgV8ZPMlWRZI?|7pCswf(2XlCC;hbr`RX7FwDzW@2_r!OUR z(o#gB|36XFwpLvo@BHyPu-5hRyyz{R{oQz?SMhd{_Fi8(F^-OV|M?qgh)>#?WN5ogAIsk(QI&H9x#*;Z@Oug3Ml;kU(VG( kXZ`(OEZqMQlh*$$;h(tw+uh${u~;hSJB@S;tNt<8 literal 0 HcmV?d00001 diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/sub1/package.json b/commands/testdata/scanpullrequest/multi-dir-test-proj/sub1/package.json deleted file mode 100644 index 8cac4fe2a..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/sub1/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "multi-dir-test-proj", - "version": "1.0.0", - "dependencies": { - "minimatch": "3.0.4", - "uglify-js": "2.2.5" - } -} diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/sub2/requirements.txt b/commands/testdata/scanpullrequest/multi-dir-test-proj/sub2/requirements.txt deleted file mode 100644 index 65c96377f..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/sub2/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pexpect==4.8.0 -pyjwt==1.7.1 \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj/sub3/sub4/package.json b/commands/testdata/scanpullrequest/multi-dir-test-proj/sub3/sub4/package.json deleted file mode 100644 index 18a78263f..000000000 --- a/commands/testdata/scanpullrequest/multi-dir-test-proj/sub3/sub4/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "multi-dir-test-proj", - "version": "1.0.0", - "dependencies": { - "minimatch": "3.0.4", - "uglify-js": "2.2.5" - } -} \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/multi-dir-test-proj.tar.gz b/commands/testdata/scanpullrequest/multi-dir-test-proj/targetBranch.gz similarity index 100% rename from commands/testdata/scanpullrequest/multi-dir-test-proj.tar.gz rename to commands/testdata/scanpullrequest/multi-dir-test-proj/targetBranch.gz diff --git a/commands/testdata/scanpullrequest/test-proj-no-vul.tar.gz b/commands/testdata/scanpullrequest/test-proj-no-vul.tar.gz deleted file mode 100644 index a96484047f0dcd5e4d8420f7ed53fdb537829b99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13419 zcmYkDby!s27w+lq?iP?nKvIVgknWHUDM^u%8jx<025ISTkQh3oK}s5=yK8379lyVO zpXdI&=fvLYygSx;{qy9f#W&Hih!T&eMa3#fL@emsQyYt*<7oub;{d z^lHk@I(>-=3#}y2*Li&dFSJV90&U@WN4}j#HrK9I>cF9`Jd`__Iz_q7q*`yxH|0Q~ zNWU!Ga?Wll4S7E_kzCr~K5@?D{^G31F>Wx@_pjJDFhri|Fc)aH0oC4qK3JW)+x?BP zQK(-=2Lcp2=_VmjxtqaS^OFJr>L&@I=(zxg_@MCQhmX!N4%mYB=>E`1%={z2`xvbm zm7hL`=P&Q*PM7!yH#sVia+*yho!czg%wDSK`BDe&AB(OIYF(K68wedx-fudbI-Gtc zH0{Y?hMNE3J!zjdS*GFu#+7@4lzJ^xc+EVQ-T;u%-2%Rc*}=y$gj|hYwg<)p#42^$ z*`;nwhC(9FBi6y6>$&(>x&m|p`$-^JV8(sFoq*Ln#(J3k$cL7!4m6MZNWWCOPyU;b zSC4<;pa&S_ZbuwXyXT`oHy~O$l-9O$ZV}+(Zovc4`Z59wqc@k-w?2GT3Bl-lK>dVK z;_}wAf^%WLgZ_u&cjdG{EuB(tl&g*G3~D;OHg_j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Yafhz_t8--RXZSIRrNh2RmFtd;mznKf&cc0a-Uj zb3r2rZIwk#LlaCu?HFQlaLO}a8&;zX_}wD7=-Iuz(Clu&KqMKS_CH8i8|F%ZfP{hE zclrp%T>uKDR1KaOmB2PpYDlYXZB(g*HIWHyKSNpRTij^Y-~K=ASLgZXw{4 zG{`*wpDuy_y>f=Y`Bg*%kM`g<=Fr0)Z!nAzns#^wG$aJV&TD|4CkXUtcWLjH6FSM@ zAdu=c>S z{Sk=T=|*6*(Z7IXd^`}KvtFvJw)!8jUk3$U9fEQYYwI)wZh-Fz*s-7A2k`HJ9(Uf)E0o$#M<2y~Ko%b5#3Z#+`ufZ$}xYU8K%>xHR*mgTJ7` OL0VA(7)UQrkp2&OW~Uth diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/COMMIT_EDITMSG b/commands/testdata/scanpullrequest/test-proj-pip/git/COMMIT_EDITMSG deleted file mode 100644 index b1b716105..000000000 --- a/commands/testdata/scanpullrequest/test-proj-pip/git/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -init diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/HEAD b/commands/testdata/scanpullrequest/test-proj-pip/git/HEAD deleted file mode 100644 index b870d8262..000000000 --- a/commands/testdata/scanpullrequest/test-proj-pip/git/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/main diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/config b/commands/testdata/scanpullrequest/test-proj-pip/git/config deleted file mode 100644 index 6c9406b7d..000000000 --- a/commands/testdata/scanpullrequest/test-proj-pip/git/config +++ /dev/null @@ -1,7 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/description b/commands/testdata/scanpullrequest/test-proj-pip/git/description deleted file mode 100644 index 498b267a8..000000000 --- a/commands/testdata/scanpullrequest/test-proj-pip/git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/index b/commands/testdata/scanpullrequest/test-proj-pip/git/index deleted file mode 100644 index 17fab6172ea22b5c0610a76be4ff62d3b9040f42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137 zcmZ?q402{*U|<4b#*~`ddB#ew%V9Jl1A`FbR>{>242?^G(%*qU`vQC1>Hvh>K4YZZmKcr 1686051583 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/logs/refs/heads/main b/commands/testdata/scanpullrequest/test-proj-pip/git/logs/refs/heads/main deleted file mode 100644 index 5c617aac6..000000000 --- a/commands/testdata/scanpullrequest/test-proj-pip/git/logs/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 54b376eb402cf9ef89447f23afb5ef0f6de96d7e delarea 1686051583 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/objects/54/b376eb402cf9ef89447f23afb5ef0f6de96d7e b/commands/testdata/scanpullrequest/test-proj-pip/git/objects/54/b376eb402cf9ef89447f23afb5ef0f6de96d7e deleted file mode 100644 index 996726d30..000000000 --- a/commands/testdata/scanpullrequest/test-proj-pip/git/objects/54/b376eb402cf9ef89447f23afb5ef0f6de96d7e +++ /dev/null @@ -1,2 +0,0 @@ -xM -1 @a=E-xdjejԅwFmd4,.y%VkrEB2d賞cB\K{l@k,"%)md2y \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/objects/5e/dae408cad286ea89e241d46ca1a958d1e420db b/commands/testdata/scanpullrequest/test-proj-pip/git/objects/5e/dae408cad286ea89e241d46ca1a958d1e420db deleted file mode 100644 index 5c29931cf..000000000 --- a/commands/testdata/scanpullrequest/test-proj-pip/git/objects/5e/dae408cad286ea89e241d46ca1a958d1e420db +++ /dev/null @@ -1 +0,0 @@ -x- D]4DԤ%4-PogyT4f i佉T[!RQ[jx;DB%tSd(:G~CbRtYCX$噷Ki>o`ypɎ|J6/ \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/test-proj-pip/git/objects/90/2d499e48521e7f329f0387e4da6bbfbba0d0b2 b/commands/testdata/scanpullrequest/test-proj-pip/git/objects/90/2d499e48521e7f329f0387e4da6bbfbba0d0b2 deleted file mode 100644 index 2215b8b9b32856ca054ff233983ea6b1578ef9bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53 zcmb865o}9cqf5gv!+gjwhFI9HZ zmyz7FwgN)PV+>TK>s2Kp^t`MAm{R5u#9V>^!jxcS0k)mttTN9vS7s<;$>XWm9B0C2 zvrF2k|KnHrpP*Or4=1_Ma|z|L$v(_{xRh?rKcP;Qf5b2%2%G%7m|zQ_CI_*J9nZgY z>;7%)re!_lA$WEOUV)m@XWcPIjGY=Q-#=Zi$>Gt_LH$_P_-O3zTF8yx{(E7TKrUr0 zpjn3tk@7SYWx)5vhvP5bK7VcCCtEhLs{iM_7zsWVYOl$C;7a{tw5EU0rJevJ{l04d0@Q%Xn62=wEyx6EV$MR{znI7O{MYc%PL*axc#r^VOLqz|29tlYv|u4Yx-v%V(t0=H<+m`0ae;{mc==U z5}7G|?&*P9lujp-hwu5Z$ZfmwKCsLCLCVdZ(J^bLFAAO*VRw3!e<4&JWogjCkU*z) zMyZ*-IG!kRI**jdgSYn2dq!7^LW)oa0fjz9-QI;S%ab$X$IyegTe;u$?1$}6(bCe= P(g;5QTR=wL01^NIOV}1Y42?^G(%*q*|Rp*Xr$~nID5(eSo(xjBkBK?BI=BMk` S=dZoh;VBNgfAK0toXD?ye3 diff --git a/commands/testdata/scanpullrequest/test-proj-subdir/git/info/exclude b/commands/testdata/scanpullrequest/test-proj-subdir/git/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/commands/testdata/scanpullrequest/test-proj-subdir/git/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/commands/testdata/scanpullrequest/test-proj-subdir/git/logs/HEAD b/commands/testdata/scanpullrequest/test-proj-subdir/git/logs/HEAD deleted file mode 100644 index 44b258ac5..000000000 --- a/commands/testdata/scanpullrequest/test-proj-subdir/git/logs/HEAD +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 9042489fc531a41457e0ade414da57b2bc9bd8bc delarea 1686051515 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/test-proj-subdir/git/logs/refs/heads/main b/commands/testdata/scanpullrequest/test-proj-subdir/git/logs/refs/heads/main deleted file mode 100644 index 44b258ac5..000000000 --- a/commands/testdata/scanpullrequest/test-proj-subdir/git/logs/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 9042489fc531a41457e0ade414da57b2bc9bd8bc delarea 1686051515 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/test-proj-subdir/git/objects/90/42489fc531a41457e0ade414da57b2bc9bd8bc b/commands/testdata/scanpullrequest/test-proj-subdir/git/objects/90/42489fc531a41457e0ade414da57b2bc9bd8bc deleted file mode 100644 index 5154ec862e5014e01b7cfe4bbd0a7128f9a6bb6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 119 zcmV--0Eqv10hNtG3c@fD06pgwdlzK4$)+n5@hjV8tC7|~hzEafz94fO7$()@C>@CB zQ*UOVGWn~p2%FKgZjonYp`0};1;(@nK?>gKr$1|hY`Zp7SnR8Nw)<;q^>In{xB*3p Z$TWa6dPFzucy;@)a^+pR`vH`9W-u`T0)^tzq?F7ehGXWpKg)E6&gpS*xbCoH_0tdszg_?& GkPr{xiWKqy diff --git a/commands/testdata/scanpullrequest/test-proj-subdir/git/objects/c6/37dbf31c89559c8c4040d740b8abe554404e8d b/commands/testdata/scanpullrequest/test-proj-subdir/git/objects/c6/37dbf31c89559c8c4040d740b8abe554404e8d deleted file mode 100644 index 7f8949b4c17e813ce27d07cc68e02a0a341396ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57 zcmV-90LK4#0V^p=O;s>4U@$Z=Ff%bxC`e4sPE1eL%PP*#W0<$*&n3%`I|SF}$4=F` PW14b~FTDf+kr)!GWzQF+ diff --git a/commands/testdata/scanpullrequest/test-proj-subdir/git/refs/heads/main b/commands/testdata/scanpullrequest/test-proj-subdir/git/refs/heads/main deleted file mode 100644 index 036e02399..000000000 --- a/commands/testdata/scanpullrequest/test-proj-subdir/git/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -9042489fc531a41457e0ade414da57b2bc9bd8bc diff --git a/commands/testdata/scanpullrequest/test-proj-subdir/sourceBranch.gz b/commands/testdata/scanpullrequest/test-proj-subdir/sourceBranch.gz new file mode 100644 index 0000000000000000000000000000000000000000..232ba33b7b03fcb7d79c013237c0bcef116a989f GIT binary patch literal 267 zcmV+m0rdVKiwFSl9KB=!1MQOEYJ)Ho#=Z6_LawJfiTMM2o3tKFT#aJlpp3qIqn5%p z+y-kmM*ZC!INwKdPQC>6A?y0K&it?`ZU2~D9{|u&lBp^^Rp4T-X9yEQY7SCyPJju` zctYe2X8FM2gX!Zacrg1CmwnMzRiB)5-s4jL3E_SIH~0qM&A*TZQ%c4B6=$&K{~Ijj z-R*;givQ1q)&uiJ_CIi+b`IA z+qzLROYG2<=(ZMpl*R*Mx3SJP)`!{5b2*u#FzoiWI%M_erF>GNa7>TsU$4Hh Rva)j5oB+9~x|9G6005&FjKBZ@ literal 0 HcmV?d00001 diff --git a/commands/testdata/scanpullrequest/test-proj-subdir/subdir/package.json b/commands/testdata/scanpullrequest/test-proj-subdir/subdir/package.json deleted file mode 100644 index 9eacfcd23..000000000 --- a/commands/testdata/scanpullrequest/test-proj-subdir/subdir/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "test-proj", - "version": "1.0.0", - "dependencies": { - "minimist": "1.2.5", - "uglify-js": "2.2.5" - } -} diff --git a/commands/testdata/scanpullrequest/test-proj-subdir.tar.gz b/commands/testdata/scanpullrequest/test-proj-subdir/targetBranch.gz similarity index 100% rename from commands/testdata/scanpullrequest/test-proj-subdir.tar.gz rename to commands/testdata/scanpullrequest/test-proj-subdir/targetBranch.gz diff --git a/commands/testdata/scanpullrequest/test-proj/git/COMMIT_EDITMSG b/commands/testdata/scanpullrequest/test-proj/git/COMMIT_EDITMSG deleted file mode 100644 index b1b716105..000000000 --- a/commands/testdata/scanpullrequest/test-proj/git/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -init diff --git a/commands/testdata/scanpullrequest/test-proj/git/HEAD b/commands/testdata/scanpullrequest/test-proj/git/HEAD deleted file mode 100644 index b870d8262..000000000 --- a/commands/testdata/scanpullrequest/test-proj/git/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/main diff --git a/commands/testdata/scanpullrequest/test-proj/git/config b/commands/testdata/scanpullrequest/test-proj/git/config deleted file mode 100644 index 6c9406b7d..000000000 --- a/commands/testdata/scanpullrequest/test-proj/git/config +++ /dev/null @@ -1,7 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true diff --git a/commands/testdata/scanpullrequest/test-proj/git/description b/commands/testdata/scanpullrequest/test-proj/git/description deleted file mode 100644 index 498b267a8..000000000 --- a/commands/testdata/scanpullrequest/test-proj/git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/commands/testdata/scanpullrequest/test-proj/git/index b/commands/testdata/scanpullrequest/test-proj/git/index deleted file mode 100644 index e494fd60a7208c3bb3e7ccd1c82dc24a678d1bb9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 145 zcmZ?q402{*U|<4b#*~`ddB&P2Cc8W~I#rb(aRX`9D 1685960481 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/test-proj/git/logs/refs/heads/main b/commands/testdata/scanpullrequest/test-proj/git/logs/refs/heads/main deleted file mode 100644 index 6c0aa2211..000000000 --- a/commands/testdata/scanpullrequest/test-proj/git/logs/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -0000000000000000000000000000000000000000 9f19e8e214da2ec75e3191980f30b567c7558ff7 delarea 1685960481 +0300 commit (initial): init diff --git a/commands/testdata/scanpullrequest/test-proj/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 b/commands/testdata/scanpullrequest/test-proj/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 deleted file mode 100644 index 7746afa2c..000000000 --- a/commands/testdata/scanpullrequest/test-proj/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 +++ /dev/null @@ -1 +0,0 @@ -x%@0Eͬi!#:-a{ι_}+[gs!,2):<"!)9H#&G!5'q+MWH ֈIG=H%"P \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/test-proj/git/objects/9f/19e8e214da2ec75e3191980f30b567c7558ff7 b/commands/testdata/scanpullrequest/test-proj/git/objects/9f/19e8e214da2ec75e3191980f30b567c7558ff7 deleted file mode 100644 index 08754d71658f9f915592946cff5a67eb19de4ce1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 118 zcmV-+0Ez#20hNtW3PK?e0Q>e7`ya%LuC5T#Rdn4~#(N23AKgB$(B}*cBmFqq1WWNW zhbl;Lv6jtQ;Y5^##iPd>Jr>SIiTq;aYVv13`+%x@9-85*-@I47zqZjI7wN|hY+y4U@$Z=Ff%bxC`e4sPE1eL%PP*#W0<$*&n3%`I|SF}$4=F` PW14b~FTDf+kr)!GWzQF+ diff --git a/commands/testdata/scanpullrequest/test-proj/git/refs/heads/main b/commands/testdata/scanpullrequest/test-proj/git/refs/heads/main deleted file mode 100644 index 368f5f0d7..000000000 --- a/commands/testdata/scanpullrequest/test-proj/git/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -9f19e8e214da2ec75e3191980f30b567c7558ff7 diff --git a/commands/testdata/scanpullrequest/test-proj/package-lock.json b/commands/testdata/scanpullrequest/test-proj/package-lock.json deleted file mode 100644 index 989446c41..000000000 --- a/commands/testdata/scanpullrequest/test-proj/package-lock.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "test-proj", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "test-proj", - "version": "1.0.0", - "dependencies": { - "minimist": "1.2.5", - "uglify-js": "2.2.5" - } - }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "engines": { - "node": ">=0.4.2" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "node_modules/optimist": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", - "dependencies": { - "wordwrap": "~0.0.2" - } - }, - "node_modules/source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ==", - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/uglify-js": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz", - "integrity": "sha512-viLk+/8G0zm2aKt1JJAVcz5J/5ytdiNaIsKgrre3yvSUjwVG6ZUujGH7E2TiPigZUwLYCe7eaIUEP2Zka2VJPA==", - "dependencies": { - "optimist": "~0.3.5", - "source-map": "~0.1.7" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==", - "engines": { - "node": ">=0.4.0" - } - } - } -} diff --git a/commands/testdata/scanpullrequest/test-proj/package.json b/commands/testdata/scanpullrequest/test-proj/package.json deleted file mode 100644 index fde9c96da..000000000 --- a/commands/testdata/scanpullrequest/test-proj/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "test-proj", - "version": "1.0.0", - "dependencies": { - "minimist": "1.2.5", - "uglify-js": "2.2.5" - } -} \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/test-proj/sourceBranch.gz b/commands/testdata/scanpullrequest/test-proj/sourceBranch.gz new file mode 100644 index 0000000000000000000000000000000000000000..c17dc3a1627d8b6d2191e1fec5cc775e5b0f48f1 GIT binary patch literal 1092 zcmV-K1iSkmiwFRk4ZUOl1MOE?Z{kQ0&gUNd;>*}wn+64pw#9iN+l6OB%D2mGPd@3G=OgvHyw;f+4 zMROdVVJKdp`4mO793$MN_@C#}UcvyXK5_-D)wvE%zlUBMk3YeAJx4PBM+7GEcU5hs z8UUX=+KiY6j{RkOAU*_+I~jkDW7#o(*EYmhEGl1Jg48bRhkTEpo=6H=yqcv$Jw!Ru);_+qs zZrXNq@R#N2;T!~{YUyBX+ThUXcb?IE&(PVO`2y&XX#$}ed?!gC7|0`kP1vqA4G70K z5>OIPrg)4*Kx4B-oHfKrO&t}MHD_9va)WA%mnoYE zP48LENd6qm$<5`@k#!=5zb;bFfkunpwT zJ7ObFA}{`Ypa_m&E+Fn86vv4>jLxOR?LZN6yD1(cohPo`$l1-_z<(;_OVY3-vnw#{ zWX4vbRWJnmxoL@YSu+9=s8RsiWUuw8xRt=?Ta*4|(l>-L=0PzVnnSGJTg@JyHKW#- zmWa616gV#Yi~@>aiOkg$>_8C(yD1(cou@!9t|-0V*(k7EG?Qc_I~9ToiKMT4yq2)v_?b znpwW2dNs9BuI0zWTrtF&VzsI)v}|Ei((J{fR$dB$*J1RIFALpy%O83ytS#1$IjmIi z$hqjRFC_BdLW-*q)nmfsNG)LO69 zW`;ABQN(usGU^ZNIm%)7?dRo9vPO0qRriO;j7c`6eacI9!OP`Grq0@WV_=Wg zPS!QeplE?sQ}L8;-|OVry4vQt668mjP!~!};I*@Id3og*?LBe#(eLH{ceiH0L_YNY zU)%b}a;E=B?LPOe|3`lX>0AH*E9CnA|HBpe?P%xy?L^CsD(iQj`6f5H$xUu@clQrh K4xpL<761TSz$Huo literal 0 HcmV?d00001 diff --git a/commands/testdata/scanpullrequest/test-proj.tar.gz b/commands/testdata/scanpullrequest/test-proj/targetBranch.gz similarity index 100% rename from commands/testdata/scanpullrequest/test-proj.tar.gz rename to commands/testdata/scanpullrequest/test-proj/targetBranch.gz diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail.tar.gz b/commands/testdata/scanpullrequest/test-same-branch-fail.tar.gz deleted file mode 100644 index 3fd3c0f7bf878f92c571014b494f63a1b41b26cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13160 zcmY+qby!s27ynClH`0i7BcL=AN`s_y2uPQ742X1tlt_ahAl)@|r!)f&-Q6)W=i=vk zf4}G6|ITyHes-+A);@c!_lqG03#pID`6CkQao~qomL<2v3P!^NW?7YRrTYh;l+~4! z@4udN9UfTud)fN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}hes%4^q3%wFdX?p9nk5XZn}Dw#a1N_lPzgN* zivhVL5`p^xH=7Hm`^Dbo%Gd7uCG(ZWk2`S=qG0&72Nb5asbU82bqPE=G+TLCKZUJ> zTh5Q6jJ#3XFP>;V^m!B3jMkcJFT02E$qDhT1$r;r4`Yw6zuGfyG;R8tuM zqKNXSx4LE@K-4+9sfb(*T4JD3-=V=>X&)$||3A|*E5qLbRqhKvRq9YQ%pQvQjA3Vl z+3=~%W9j>_Q&X^4B7C?!7x;T`1ir@2HGchgm4LWPkUs0b0M`XwL!>Wv-J!5l(Z3H} zAlOCIQB_bSga@{VIr$y9+?9ef!_96%z2$*buu-$6`;Kikv%Mfl;Pw*){5S^R*hS2h zAXr^KB2H!^fcr}Z`0YZYmp1}hWg-sq-zfptxKwmNd-WJCYGH(7CUw(}28zCgAC`^y zQdP_6D-3CL3oV34<_wFwJx$9O60it!)PX@5VZ-|m{h;C}mp1#95erzsK@_j~vk?g} zvnpL(nEt2CzKVWdYl}X444RWcIkT@%_lfs7nqU3^s*l=NbgU;w~4U57%4_ nu#QP%_(~Q8fTQY5{ap0}W0uQ=prGS0-vRR^qFzYPP>}u~jA(nxsATc>RF+Ei;t2jRoq?>^uB*@hjNJ%mnDj0C>h&N2q qI?bf&q@i{E?A8Aj4M$FY-?wLXNWkw$k_IA 1684934822 +0300 commit (initial): init -040abf2a9d8a9f4aeaede3b8431d988d57fddf36 ebe022f659464ddc9f973bce7d5c491a6484d210 delarea 1685959812 +0300 commit: init diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/git/logs/refs/heads/main b/commands/testdata/scanpullrequest/test-same-branch-fail/git/logs/refs/heads/main deleted file mode 100644 index 83bc3f710..000000000 --- a/commands/testdata/scanpullrequest/test-same-branch-fail/git/logs/refs/heads/main +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 040abf2a9d8a9f4aeaede3b8431d988d57fddf36 delarea 1684934822 +0300 commit (initial): init -040abf2a9d8a9f4aeaede3b8431d988d57fddf36 ebe022f659464ddc9f973bce7d5c491a6484d210 delarea 1685959812 +0300 commit: init diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/04/0abf2a9d8a9f4aeaede3b8431d988d57fddf36 b/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/04/0abf2a9d8a9f4aeaede3b8431d988d57fddf36 deleted file mode 100644 index 3780e20e3cd42da0443d8649ddbebc7769782f1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 119 zcmV--0Eqv10hNtG4gw(z06p`H-c3w*DN9L=@heceidiHfc<}e~1&=eyWTe$v1}x5> zMpp&dtj}q;i*Rr*2n!)$_JoOJQs-#0ayIcZo~=XHBX*5&)o(nq-d}rfkBhW=gJok1 ZmUvy^j26*MJ6}Wpt4w*9VSdbLGAJuHHY5N5 diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/41/0fc517e03bad9856571ee01247417d91a5405d b/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/41/0fc517e03bad9856571ee01247417d91a5405d deleted file mode 100644 index 833b1ab88..000000000 --- a/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/41/0fc517e03bad9856571ee01247417d91a5405d +++ /dev/null @@ -1 +0,0 @@ -x%0a}m]|vciĘ˚}O_=pW !-tKg#o܄V6.vv'<&{S%i^B'<v,& \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 b/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 deleted file mode 100644 index 7746afa2c..000000000 --- a/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/9e/acfcd239f1b811ad6f5d952cdc3564ce0e6774 +++ /dev/null @@ -1 +0,0 @@ -x%@0Eͬi!#:-a{ι_}+[gs!,2):<"!)9H#&G!5'q+MWH ֈIG=H%"P \ No newline at end of file diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/b8/5f31622acb022542282ac7cdd5ff7880c4cbf7 b/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/b8/5f31622acb022542282ac7cdd5ff7880c4cbf7 deleted file mode 100644 index 6b1b32184665f58f8a6c6acfddab5e52411da55a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57 zcmV-90LK4#0V^p=O;s>4U@$Z=Ff%bxC`e4sPE1eL%PP*#V{qg@D*nKF?ToN+xd%e- PjZ71Yf2DVS}zv5 diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/c6/37dbf31c89559c8c4040d740b8abe554404e8d b/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/c6/37dbf31c89559c8c4040d740b8abe554404e8d deleted file mode 100644 index 7f8949b4c17e813ce27d07cc68e02a0a341396ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57 zcmV-90LK4#0V^p=O;s>4U@$Z=Ff%bxC`e4sPE1eL%PP*#W0<$*&n3%`I|SF}$4=F` PW14b~FTDf+kr)!GWzQF+ diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/eb/e022f659464ddc9f973bce7d5c491a6484d210 b/commands/testdata/scanpullrequest/test-same-branch-fail/git/objects/eb/e022f659464ddc9f973bce7d5c491a6484d210 deleted file mode 100644 index 6959f5e00e5ffd17a27ec1d0a3fbd844611ba5c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZku0hNwH3c@fD06pgwxeJnRl6C_ker1#0)k@n)hzEafzTj;b7?@J`eeD)p zJoP4GGe-5(3_vA2fEWO9@KTtg>VoJ>C|MWtrY1+XE;z~xlo%;#AR%G#8H1lVA#z-l zS^aG2)1S3jmTiP&ukxjh<^IxEAD2@1o1JEiDJGo2o}G8j3_ISs{8yRvSiAWF$QwZ< D7bQiR diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/git/refs/heads/main b/commands/testdata/scanpullrequest/test-same-branch-fail/git/refs/heads/main deleted file mode 100644 index bfd27406d..000000000 --- a/commands/testdata/scanpullrequest/test-same-branch-fail/git/refs/heads/main +++ /dev/null @@ -1 +0,0 @@ -ebe022f659464ddc9f973bce7d5c491a6484d210 diff --git a/commands/testdata/scanpullrequest/test-same-branch-fail/package.json b/commands/testdata/scanpullrequest/test-same-branch-fail/package.json deleted file mode 100644 index 410fc517e..000000000 --- a/commands/testdata/scanpullrequest/test-same-branch-fail/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "test-same-branch-fail", - "version": "1.0.0", - "dependencies": { - "minimist": "1.2.5", - "uglify-js": "2.2.5" - } -} diff --git a/commands/testdata/scanpullrequests/test-proj-with-vulnerability/test-proj/package.json b/commands/testdata/scanpullrequests/test-proj-with-vulnerability/test-proj/package.json deleted file mode 100644 index d756470ca..000000000 --- a/commands/testdata/scanpullrequests/test-proj-with-vulnerability/test-proj/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "test-proj", - "version": "1.0.0", - "dependencies": { - "minimatch": "0.2.14", - "uglify-js": "2.2.5" - } -} diff --git a/commands/testdata/scanpullrequests/test-proj/test-proj/package.json b/commands/testdata/scanpullrequests/test-proj/test-proj/package.json deleted file mode 100644 index d756470ca..000000000 --- a/commands/testdata/scanpullrequests/test-proj/test-proj/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "test-proj", - "version": "1.0.0", - "dependencies": { - "minimatch": "0.2.14", - "uglify-js": "2.2.5" - } -} diff --git a/commands/utils/consts.go b/commands/utils/consts.go index 9595b53f0..148f0785c 100644 --- a/commands/utils/consts.go +++ b/commands/utils/consts.go @@ -8,8 +8,7 @@ const ( baseResourceUrl = "https://raw.githubusercontent.com/jfrog/frogbot/master/resources/" // Errors - errUnsupportedMultiRepo = "multi repository configuration isn't supported. Only one repository configuration is allowed" - ErrScanPullRequestSameBranches = "scan pull request command triggered on the same branch: %s, Please check your configuration" + errUnsupportedMultiRepo = "multi repository configuration isn't supported. Only one repository configuration is allowed" // Images NoVulnerabilityPrBannerSource ImageSource = "v2/noVulnerabilityBannerPR.png" diff --git a/commands/utils/params.go b/commands/utils/params.go index 8bd174131..bd48bdab0 100644 --- a/commands/utils/params.go +++ b/commands/utils/params.go @@ -23,6 +23,9 @@ import ( const ( frogbotConfigDir = ".frogbot" FrogbotConfigFile = "frogbot-config.yml" + + // Pull Request ID cannot be 0 + UndefinedPrID = 0 ) var ( @@ -232,10 +235,13 @@ func (g *Git) setDefaultsIfNeeded(git *Git) (err error) { g.EmailAuthor = frogbotAuthorEmail } } - // Non-mandatory git branch pr id. - if pullRequestIDString := getTrimmedEnv(GitPullRequestIDEnv); pullRequestIDString != "" { - if g.PullRequestID, err = strconv.Atoi(pullRequestIDString); err != nil { - return err + if g.PullRequestID == UndefinedPrID { + if idStr := getTrimmedEnv(GitPullRequestIDEnv); idStr != "" { + idNum, err := strconv.Atoi(idStr) + if err != nil { + return fmt.Errorf("failed parsing pull request ID as a number. ID as string : %s", idStr) + } + g.PullRequestID = idNum } } return @@ -457,8 +463,7 @@ func extractVcsProviderFromEnv() (vcsutils.VcsProvider, error) { case string(AzureRepos): return vcsutils.AzureRepos, nil } - - return 0, fmt.Errorf("%s should be one of: '%s', '%s' or '%s'", GitProvider, GitHub, GitLab, BitbucketServer) + return 0, fmt.Errorf("%s should be one of: '%s', '%s', '%s' or '%s'", GitProvider, GitHub, GitLab, BitbucketServer, AzureRepos) } func SanitizeEnv() error { diff --git a/commands/utils/params_test.go b/commands/utils/params_test.go index 2920cfb4c..348b7dc57 100644 --- a/commands/utils/params_test.go +++ b/commands/utils/params_test.go @@ -113,7 +113,7 @@ func TestExtractClientInfo(t *testing.T) { }() _, err := extractClientInfo() - assert.EqualError(t, err, "JF_GIT_PROVIDER should be one of: 'github', 'gitlab' or 'bitbucketServer'") + assert.EqualError(t, err, "JF_GIT_PROVIDER should be one of: 'github', 'gitlab', 'bitbucketServer' or 'azureRepos'") SetEnvAndAssert(t, map[string]string{GitProvider: "github"}) _, err = extractClientInfo() @@ -311,7 +311,7 @@ func TestGenerateConfigAggregatorFromEnv(t *testing.T) { ClientInfo: ClientInfo{ GitProvider: vcsutils.GitHub, VcsInfo: vcsclient.VcsInfo{ - APIEndpoint: "endpoint.com", + APIEndpoint: "https://github.com", Token: "123456789", }, RepoName: "repoName", diff --git a/commands/utils/scandetails.go b/commands/utils/scandetails.go index df44a5115..016c36ba6 100644 --- a/commands/utils/scandetails.go +++ b/commands/utils/scandetails.go @@ -72,6 +72,11 @@ func (sc *ScanDetails) MinSeverityFilter() string { return sc.minSeverityFilter } +func (sc *ScanDetails) SetRepoOwner(owner string) *ScanDetails { + sc.RepoOwner = owner + return sc +} + func createXrayScanParams(watches []string, project string) (params *services.XrayGraphScanParams) { params = &services.XrayGraphScanParams{ ScanType: services.Dependency, diff --git a/commands/utils/utils.go b/commands/utils/utils.go index 8c7064b03..2a4999a1a 100644 --- a/commands/utils/utils.go +++ b/commands/utils/utils.go @@ -217,6 +217,7 @@ func DownloadRepoToTempDir(client vcsclient.VcsClient, branch string, git *Git) log.Debug("Created temp working directory: ", wd) log.Debug(fmt.Sprintf("Downloading %s/%s , branch: %s to: %s", git.RepoOwner, git.RepoName, branch, wd)) if err = client.DownloadRepository(context.Background(), git.RepoOwner, git.RepoName, branch, wd); err != nil { + err = fmt.Errorf("failed to download repository: %s, owner: %s, branch: %s, error: %s", git.RepoName, git.RepoOwner, branch, err.Error()) return } log.Debug("Repository download completed") diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-dotnet.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-dotnet.yml index 4df3d608f..fc918b6ad 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-dotnet.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-dotnet.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - uses: actions/setup-dotnet@v2 with: diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-go.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-go.yml index 3a69d0630..f2d0026d7 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-go.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-go.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - name: Setup Go uses: actions/setup-go@v3 diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-gradle.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-gradle.yml index d8e152786..cce803dbe 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-gradle.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-gradle.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - name: Set up Java uses: actions/setup-java@v3 diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-maven.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-maven.yml index 701e0a559..3645744f2 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-maven.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-maven.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - name: Set up Java uses: actions/setup-java@v3 diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-npm.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-npm.yml index 61646535d..78c45c728 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-npm.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-npm.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - name: Setup NodeJS uses: actions/setup-node@v3 diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-nuget.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-nuget.yml index f39cff82f..a241d9a00 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-nuget.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-nuget.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - uses: nuget/setup-nuget@v1 with: diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-pip.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-pip.yml index 279fcbec3..75431ffe1 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-pip.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-pip.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - uses: actions/setup-python@v3 with: diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-pipenv.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-pipenv.yml index 8b85356c3..a2a121b1f 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-pipenv.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-pipenv.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - uses: actions/setup-python@v3 with: diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-poetry.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-poetry.yml index 4b20a2bae..de92620ca 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-poetry.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-poetry.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - uses: actions/setup-python@v3 with: diff --git a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-yarn.yml b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-yarn.yml index 962adc490..bffc458f3 100644 --- a/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-yarn.yml +++ b/docs/templates/github-actions/scan-pull-request/frogbot-scan-pr-yarn.yml @@ -12,10 +12,6 @@ jobs: # "frogbot" GitHub environment can approve the pull request to be scanned. environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # Install prerequisites - name: Setup NodeJS uses: actions/setup-node@v3 diff --git a/go.mod b/go.mod index d06e9bf00..2e445fcc9 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/go-git/go-git/v5 v5.7.0 github.com/golang/mock v1.6.0 github.com/jfrog/build-info-go v1.9.6 - github.com/jfrog/froggit-go v1.9.0 + github.com/jfrog/froggit-go v1.11.0 github.com/jfrog/gofrog v1.3.0 github.com/jfrog/jfrog-cli-core/v2 v2.39.3 github.com/jfrog/jfrog-client-go v1.31.2 diff --git a/go.sum b/go.sum index fa94e5e27..7d922a09e 100644 --- a/go.sum +++ b/go.sum @@ -220,8 +220,8 @@ github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1R github.com/jedib0t/go-pretty/v6 v6.4.6/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= github.com/jfrog/build-info-go v1.9.6 h1:lCJ2j5uXAlJsSwDe5J8WD7Co1f/hUlZvMfwfb5AzLJU= github.com/jfrog/build-info-go v1.9.6/go.mod h1:GbuFS+viHCKZYx9nWHYu7ab1DgQkFdtVN3BJPUNb2D4= -github.com/jfrog/froggit-go v1.9.0 h1:cLdQJHZOph+mEvS1QiF84X7qonDKP1paTyr2bQcuGr0= -github.com/jfrog/froggit-go v1.9.0/go.mod h1:XTFf4RqWwZsF9pdERt0Ra5gO1O3iqIq7Npx2tEQSGAQ= +github.com/jfrog/froggit-go v1.11.0 h1:LdQbihrJWh+G3G+5KmDOIyWmzr1F21zwK4X1t99ooeE= +github.com/jfrog/froggit-go v1.11.0/go.mod h1:XTFf4RqWwZsF9pdERt0Ra5gO1O3iqIq7Npx2tEQSGAQ= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= github.com/jfrog/jfrog-cli-core/v2 v2.39.3 h1:GtBwEAchuvI4c8ZwaJ6CKN/KavMlEu5+DwNX9OesYMI= diff --git a/starter-workflows/code-scanning/frogbot-scan-pr.yml b/starter-workflows/code-scanning/frogbot-scan-pr.yml index 2dc0a2ac3..2c5488f50 100644 --- a/starter-workflows/code-scanning/frogbot-scan-pr.yml +++ b/starter-workflows/code-scanning/frogbot-scan-pr.yml @@ -24,10 +24,6 @@ jobs: # Read more here (Install Frogbot Using GitHub Actions): https://github.com/jfrog/frogbot/blob/master/docs/install-github.md environment: frogbot steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - # IMPORTANT: # 1. See the following link for information about the tools that need to be installed for Frogbot to work - https://github.com/jfrog/frogbot/tree/master/docs/templates/github-actions/scan-and-fix # 2. The structure of some projects require creating a frogbot-config.yml file. Read more about it here - https://github.com/jfrog/frogbot/blob/master/docs/frogbot-config.md