Skip to content

Increasing security posture of HTC Grid by enforcing and fixing relevant encryption, authentication and RBAC issues #99

Increasing security posture of HTC Grid by enforcing and fixing relevant encryption, authentication and RBAC issues

Increasing security posture of HTC Grid by enforcing and fixing relevant encryption, authentication and RBAC issues #99

Workflow file for this run

# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# Licensed under the Apache License, Version 2.0 https://aws.amazon.com/apache-2-0/
name: Test-Bandit
on: [push, pull_request]
permissions:
contents: read
jobs:
bandit:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-latest
env:
BANDIT_REPORT_FILE: bandit_report.sarif
steps:
- name: Checkout the branch
uses: actions/checkout@v3
- name: Install bandit and bandit-sarif-formatter
run: |-
pip3 install bandit bandit-sarif-formatter
- name: Run bandit and generate report
run: |-
bandit --configfile .github/workflows/bandit.conf \
--format sarif --exit-zero --recursive \
--output ${{ env.BANDIT_REPORT_FILE }} .
- name: Upload bandit scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: success() || failure()
with:
sarif_file: "${{ env.BANDIT_REPORT_FILE }}"
- name: Save report results as an artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.BANDIT_REPORT_FILE }}
path: ${{ env.BANDIT_REPORT_FILE }}