Skip to content

Commit

Permalink
add Python 3.11 to SAST integration tests + WebGoat for Java
Browse files Browse the repository at this point in the history
  • Loading branch information
gruebel committed Oct 25, 2023
1 parent 0b9d9cd commit fd05ae4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ jobs:
strategy:
fail-fast: true
matrix:
python: [ "3.8" ]
os: [ ubuntu-latest, macos-latest]
python: ["3.8", "3.11"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
Expand All @@ -170,8 +170,8 @@ jobs:
bash -c 'pipenv run pip install dist/checkov-*.whl'
- name: Clone flask - Python repo for SAST
run: git clone https://github.com/pallets/flask
- name: Clone jenkins - Java repo for SAST
run: git clone https://github.com/jenkinsci/jenkins
- name: Clone WebGoat - Java repo for SAST
run: git clone https://github.com/WebGoat/WebGoat
- name: Clone axios - JavaScript repo for SAST
run: git clone https://github.com/axios/axios
- name: Create checkov reports
Expand All @@ -192,8 +192,8 @@ jobs:
strategy:
fail-fast: true
matrix:
python: [ "3.8" ]
os: [ ubuntu-latest, macos-latest]
python: ["3.8", "3.11"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
Expand Down
8 changes: 3 additions & 5 deletions sast_integration_tests/prepare_data.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

pipenv run checkov -s --framework sast_python -d flask --repo-id cli/flask -o json > checkov_report_sast_python.json
pipenv run checkov -s --framework sast_javascript -d axios --repo-id cli/axios -o json > checkov_report_sast_javascript.json

# todo - find a smaller java repo and enable the java integration test
# pipenv run checkov -s --framework sast_java -d jenkins --repo-id cli/jenkins -o json > checkov_report_sast_java.json
pipenv run checkov -s --framework sast_python -d flask --repo-id cli/flask -o json --output-file-path checkov_report_sast_python.json,
pipenv run checkov -s --framework sast_java -d WebGoat --repo-id cli/webgoat -o json --output-file-path checkov_report_sast_java.json,
pipenv run checkov -s --framework sast_javascript -d axios --repo-id cli/axios -o json --output-file-path checkov_report_sast_javascript.json,
3 changes: 0 additions & 3 deletions sast_integration_tests/test_checkov_sast_report.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import json
import os

import pytest

current_dir = os.path.dirname(os.path.realpath(__file__))


Expand All @@ -11,7 +9,6 @@ def test_sast_python() -> None:
validate_report(os.path.abspath(report_path))


@pytest.mark.skip(reason="Need to find a smaller java repo - jenkins is too heavy")
def test_sast_java() -> None:
report_path = os.path.join(current_dir, '..', 'checkov_report_sast_java.json')
validate_report(os.path.abspath(report_path))
Expand Down

0 comments on commit fd05ae4

Please sign in to comment.