Skip to content

Commit 4ef2762

Browse files
itai1357ipeleg
andauthored
fix(sca): remove old test for the depracated workflow github-action (bridgecrewio#6232)
* remove old test for the depracated workflow github-action * remove the unused preparingg command --------- Co-authored-by: ipeleg <[email protected]>
1 parent 2856530 commit 4ef2762

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

integration_tests/prepare_data.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ then
3535
pipenv run checkov -s -d terragoat/terraform/azure/ --repo-id checkov/integration_test --bc-api-key $BC_KEY > checkov_report_azuredir_api_key_terragoat.txt
3636
pipenv run checkov -s -d terragoat/terraform/azure/ --repo-id checkov/integration_test --skip-results-upload --bc-api-key $BC_KEY > checkov_report_azuredir_api_key_terragoat_no_upload.txt
3737
echo "running image referencing"
38-
pipenv run checkov -s -d integration_tests/example_workflow_file/.github/workflows/ -o json --repo-id checkov/integration_test --bc-api-key $BC_KEY --include-all-checkov-policies > checkov_report_workflow_cve.json
3938
pipenv run checkov -s -d integration_tests/example_workflow_file/bitbucket/ -o json --repo-id checkov/integration_test --bc-api-key $BC_KEY --include-all-checkov-policies > checkov_report_bitbucket_pipelines_cve.json
4039
echo "running list"
4140
pipenv run checkov --list --bc-api-key $BC_KEY --output-bc-ids > checkov_checks_list.txt

integration_tests/run_integration_tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ prepare_data () {
2424

2525
python checkov/main.py -s -f repositories/terragoat/terraform/aws/s3.tf --repo-id checkov/integration_test --bc-api-key $BC_KEY > checkov_report_s3_singlefile_api_key_terragoat.txt
2626
python checkov/main.py -s -d repositories/terragoat/terraform/azure/ --repo-id checkov/integration_test --bc-api-key $BC_KEY > checkov_report_azuredir_api_key_terragoat.txt
27-
python checkov/main.py -s -d integration_tests/example_workflow_file/.github/workflows/ -o json --repo-id checkov/integration_test --bc-api-key $BC_KEY --include-all-checkov-policies > checkov_report_workflow_cve.json
2827
python checkov/main.py -s -d integration_tests/example_workflow_file/bitbucket/ -o json --repo-id checkov/integration_test --bc-api-key $BC_KEY --include-all-checkov-policies > checkov_report_bitbucket_pipelines_cve.json
2928
python checkov/main.py --list --bc-api-key $BC_KEY --output-bc-ids > checkov_checks_list.txt
3029
}

integration_tests/test_checkov_cli_integration_report.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,6 @@ def validate_report(self, report_path, url_should_exist=True):
2828
platform_url_found = True
2929
self.assertEqual(platform_url_found, url_should_exist, "when using api key and not --skip-results-upload, platform code review url should exist")
3030

31-
def test_workflow_report_api_key(self):
32-
report_path = os.path.join(current_dir, '..', 'checkov_report_workflow_cve.json')
33-
if sys.version_info[1] == 8 and platform.system() == 'Linux':
34-
with open(report_path, encoding='utf-8') as f:
35-
reports = json.load(f)
36-
print(reports)
37-
self.assertGreaterEqual(len(reports), 2,
38-
"expecting to have 2 reports at least, github_Actions and sca_image")
39-
github_actions_report_exists = False
40-
sca_image = False
41-
for report in reports:
42-
if report["check_type"] == "github_actions":
43-
github_actions_report_exists = True
44-
self.assertGreaterEqual(report['summary']['failed'], 1)
45-
if report["check_type"] == "sca_image":
46-
sca_image = True
47-
self.assertGreaterEqual(report['summary']['failed'], 1)
48-
self.assertTrue(sca_image)
49-
self.assertTrue(github_actions_report_exists)
50-
5131
def test_bitbucket_pipelines_report_api_key(self):
5232
report_path = os.path.join(current_dir, '..', 'checkov_report_bitbucket_pipelines_cve.json')
5333
if sys.version_info[1] == 8 and platform.system() == 'Linux':

0 commit comments

Comments
 (0)