diff --git a/analyzers/cfn-lint/CI/gitlab-ci.yaml b/analyzers/cfn-lint/CI/gitlab-ci.yaml new file mode 100644 index 0000000..237f51e --- /dev/null +++ b/analyzers/cfn-lint/CI/gitlab-ci.yaml @@ -0,0 +1,14 @@ +stages: + - scan + +scan: + stage: scan + image: python:latest # Using Python image because cfn-lint is a Python package + before_script: + - pip install cfn-lint # Install cfn-lint + script: + - cfn-lint -t ./**/*.yaml -f sarif > cfn-lint.sarif || true # Run cfn-lint and generate SARIF report + - curl -sSL https://deepsource.io/cli | sh # Install DeepSource CLI + - ./bin/deepsource report --analyzer cfn-lint --analyzer-type community --value-file ./cfn-lint.sarif # Upload SARIF report to DeepSource + rules: + - if: $CI_PIPELINE_SOURCE == "push" \ No newline at end of file