Skip to content

Microsoft Defender to Tenable One Connector #5

Microsoft Defender to Tenable One Connector

Microsoft Defender to Tenable One Connector #5

Workflow file for this run

name: Testing Pipeline
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
connector-list:
runs-on: ubuntu-latest
outputs:
connectors: ${{ steps.list.outputs.connectors }}
steps:
- uses: actions/checkout@v4
- name: Collect Connector list
id: list
run: |
echo "connectors=$(ls connectors | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
test-build:
name: connector ${{ matrix.connector }}
runs-on: ubuntu-latest
continue-on-error: true
needs: connector-list
strategy:
matrix:
connector: ${{ fromJSON(needs.connector-list.outputs.connectors) }}
steps:
- uses: actions/checkout@v4
- name: Install TOML Tools
run: pip install toml-cli
- name: Create Build Environment
run: |
mkdir build
cp -a connectors/${{ matrix.connector }}/* build/
cp base/* build/
cp base/.dockerignore build/
- name: Build ${{ matrix.connector }}
run: |
export BUILDX_NO_DEFAULT_ATTESTATIONS=1
CON_VERSION=$(toml get --toml-path build/pyproject.toml project.version)
docker buildx build build \
--progress plain \
--no-cache \
--target release \
--tag connector \
--tag tenable-connectors/connector-${{ matrix.connector }}:latest \
--tag tenable-connectors/connector-${{ matrix.connector }}:${CON_VERSION}
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Scout
uses: docker/scout-action@v1
with:
command: cves,recommendations,compare
image: connector
only-severities: critical,high,medium
ignore-unchanged: true
ignore-base: true