Skip to content

Create bug-report.md #10

Create bug-report.md

Create bug-report.md #10

Workflow file for this run

name: Tenable - cloud.tenable.com
on:
push:
workflow_dispatch:
jobs:
fetch_and_save_scans:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
CI_COMMIT_MESSAGE: New Tenable Scan Results
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Load environment variables
run: |
export $(cat .github/variables.yml | xargs)
shell: bash
- name: Set up Python environment
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install pytenable click arrow
- name: Verify pytenable installation
run: |
source venv/bin/activate
python3 -m pip show pytenable || echo "pytenable not installed."
- name: Check if collection directory exists
run: |
if [ -d "scans/" ]; then echo "Directory exists"; else echo "Directory does not exist"; fi
- name: List evidence-collection directory contents
run: ls -la scans/
- name: Debug API Key
run: echo "Tenable Access Key is set."
- name: Debug environment variables
run: printenv | grep TIO
- name: Run Tenable Scan Script
env:
TIO_ACCESS_KEY: ${{ secrets.TENABLE_ACCESS_KEY }}
TIO_SECRET_KEY: ${{ secrets.TENABLE_SECRET_KEY }}
run: |
# Activate the virtual environment and run the script with the python from venv
source venv/bin/activate
./venv/bin/python3 src/tenable.py --download-path scans/
- name: Commit & Push changes
uses: EndBug/add-and-commit@v7
with:
author_name: 'GitHub Actions'
author_email: '[email protected]'
message: ${{ env.CI_COMMIT_MESSAGE }}
- name: Upload Commercial Tenable Reports
uses: actions/upload-artifact@main
with:
name: tenable-reports
path: scans/