Skip to content

Generate ATT&CK Data #157

Generate ATT&CK Data

Generate ATT&CK Data #157

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/checkout@v3.3.0
- name: Set up Python Environment
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip
pip --version
- name: Run image
uses: abatilo/actions-poetry@v2.3.0
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 "rickardja@live.com"
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