Skip to content

Add env prefix to variables #2

Add env prefix to variables

Add env prefix to variables #2

Workflow file for this run

name: Lint and check code for errors
on:
push:
branches:
- main
- dev
paths-ignore:
- 'Payload_Type/thanatos/Dockerfile'
pull_request:
branches:
- main
- dev
workflow_dispatch:
env:
THANATOS_PATH: Payload_Type/thanatos
AGENT_CODE: ${{ env.THANATOS_PATH }}/thanatos/agent_code

Check failure on line 21 in .github/workflows/lint.yml

View workflow run for this annotation

GitHub Actions / Lint and check code for errors

Invalid workflow file

The workflow is not valid. .github/workflows/lint.yml (Line: 21, Col: 15): Unrecognized named-value: 'env'. Located at position 1 within expression: env.THANATOS_PATH .github/workflows/lint.yml (Line: 22, Col: 16): Unrecognized named-value: 'env'. Located at position 1 within expression: env.THANATOS_PATH
MYTHIC_CODE: ${{ env.THANATOS_PATH }}/thanatos/mythic/agent_functions
jobs:
syntax:
name: Check Syntax
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/workflows/lint-setup
- name: Check Mythic code for errors
run: python -m pylint -f colorized --errors-only ${THANATOS_PATH}/*.py ${MYTHIC_CODE}/*.py
- name: Check Agent code for errors
working-directory: ${{ env.AGENT_CODE }}
run: cargo check --color always --all-targets --all-features
env:
UUID: ""
callback_interval: ""
callback_jitter: ""
encrypted_exchange_check: ""
connection_retries: ""
working_hours: ""
format:
name: Check Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/workflows/lint-setup
- name: Check Mythic code formatting
run: python -m black --color --diff --check ${THANATOS_PATH}/*.py ${MYTHIC_CODE}/*.py
- name: Check Agent code formatting
working-directory: ${{ env.AGENT_CODE }}
run: cargo fmt -- --color always --check
env:
UUID: ""
callback_interval: ""
callback_jitter: ""
encrypted_exchange_check: ""
connection_retries: ""
working_hours: ""
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/workflows/lint-setup
- name: Install Clippy
run: rustup component add clippy
- name: Lint Mythic code with pylint
run: python -m pylint -f colorized --rcfile ${THANATOS_PATH}/pylintrc ${THANATOS_PATH}/*.py ${MYTHIC_CODE}/*.py
- name: Lint Agent code with clippy
working-directory: ${{ env.AGENT_CODE }}
run: cargo clippy --color always --all-features --all-targets -- -D warnings
env:
UUID: ""
callback_interval: ""
callback_jitter: ""
encrypted_exchange_check: ""
connection_retries: ""
working_hours: ""