Skip to content

Generate ATT&CK Data #159

Generate ATT&CK Data

Generate ATT&CK Data #159

name: Generate ATT&CK Data
on:
schedule:
- cron: "0 3 1,15 * *"
push:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: ["1.5.1"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: write
steps:
- uses: actions/[email protected]
- name: Set up Python Environment
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip
pip --version
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Generate new data_collector data
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry config virtualenvs.create false
poetry install
cd data_collector
poetry config virtualenvs.create false
poetry install
poetry run python run.py
- name: Commit and push changes
run: |
git config --global user.name "MSAdministrator"
git config --global user.email "[email protected]"
git add -A
git commit -m "commit message"
git push
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.SWIMLANE_PYATTCK_ROLE }}
aws-region: us-west-2
- name: Upload files to S3 with AWS CLI
run: |
aws s3 cp generated_attck_data_v3.json s3://${{ secrets.SWIMLANE_PYATTCK_AWS_BUCKET_NAME }} --acl public-read