-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from lindsey-w/master
Update psuedocode
- Loading branch information
Showing
280 changed files
with
12,725 additions
and
2,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Lint the yaml | ||
|
||
on: | ||
pull_request_target: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull down repo | ||
uses: actions/checkout@v3 | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install script dependencies | ||
run: pip install -r ./scripts/requirements.txt | ||
- name: Run yamllint | ||
run: yamllint analytics/ data_model/ sensors/ | ||
analysis-schema: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull down repo | ||
uses: actions/checkout@v3 | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install script dependencies | ||
run: pip install -r ./scripts/requirements.txt | ||
- name: Validate against analysis schema | ||
run: yamale -s scripts/analytic_schema.yaml --no-strict analytics/ | ||
datamodel-schema: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull down repo | ||
uses: actions/checkout@v3 | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install script dependencies | ||
run: pip install -r ./scripts/requirements.txt | ||
- name: Validate against data model schema | ||
run: yamale -s scripts/datamodel_schema.yaml --no-strict data_model/ | ||
sensor-schema: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull down repo | ||
uses: actions/checkout@v3 | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install script dependencies | ||
run: pip install -r ./scripts/requirements.txt | ||
- name: Validate against sensor schema | ||
run: yamale -s scripts/sensor_schema.yaml --no-strict sensors/ | ||
filetype-is-yaml: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull down repo | ||
uses: actions/checkout@v3 | ||
- name: Files should be .yaml not .yml and should also be actual files (ex. not directories) | ||
shell: bash | ||
run: find analytics data_model sensors -mindepth 1 -maxdepth 1 \( ! -name "*.yaml" \) -o \( ! -type f \) | ||
id-filename-equivalence: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull down repo | ||
uses: actions/checkout@v3 | ||
- name: Analytics files need to have their filename be '{id}.yaml' | ||
run: > | ||
ret=0; | ||
for file in analytics/*.yaml; do | ||
echo "Checking $file"; | ||
if ! [ "$(basename $file | sed -e "s/\.yaml$//")" = "$(yq '.id' < $file)" ]; then | ||
echo "Failed"; | ||
ret=1; | ||
fi; | ||
done; | ||
exit "$ret" | ||
- name: Data model files need to have their filename be '{name but fully lowercase and with underscores replacing spaces}.yaml' | ||
run: > | ||
ret=0; | ||
for file in data_model/*.yaml; do | ||
echo "Checking $file"; | ||
if ! [ "$(basename $file | sed -e "s/\.yaml$//")" = "$(yq '.name | downcase | sub(" ", "_")' < $file)" ]; then | ||
echo "Failed"; | ||
ret=1; | ||
fi; | ||
done; | ||
exit "$ret" | ||
- name: Sensor files need to have their filename be '{sensor_name but fully lowercase}_{sensor_version}.yaml' | ||
run: > | ||
ret=0; | ||
for file in sensors/*.yaml; do | ||
echo "Checking $file"; | ||
if ! [ "$(basename $file | sed -e "s/\.yaml$//")" = "$(yq '(.sensor_name | downcase) + "_" + .sensor_version' < $file)" ]; then | ||
echo "Failed"; | ||
ret=1; | ||
fi; | ||
done; | ||
exit "$ret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Regenerate /docs using the generate_*.py scripts | ||
|
||
on: | ||
pull_request_target: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
regenerate: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Pull down repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.head_ref }} | ||
- name: Clean /docs/data_model | ||
shell: bash | ||
run: rm -rfv ./docs/data_model | ||
- name: Clean /docs/analytics | ||
shell: bash | ||
run: rm -rfv ./docs/analytics | ||
- name: Clean /docs/sensors | ||
shell: bash | ||
run: rm -rfv ./docs/sensors | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install script dependencies | ||
run: pip install -r ./scripts/requirements.txt | ||
- name: Regenerate datamodels | ||
working-directory: ./scripts | ||
run: python generate_datamodels.py | ||
- name: Regenerate analytics | ||
working-directory: ./scripts | ||
run: python generate_analytics.py | ||
- name: Regenerate sensors | ||
working-directory: ./scripts | ||
run: python generate_sensors.py | ||
- name: Regenerate attack nav layer | ||
working-directory: ./scripts | ||
run: python generate_attack_nav_layer.py | ||
- name: Commit new static site | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'Automated commit to rebuild the static site' | ||
commit_options: '--signoff' | ||
commit_user_name: 'Build and Push Automation Script' | ||
commit_user_email: '<>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
line-length: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
title: Processes Spawning cmd.exe | ||
submission_date: 2013/02/05 | ||
information_domain: Host | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
title: Suspicious Run Locations | ||
submission_date: 2013/05/07 | ||
information_domain: Host | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
title: Execution with AT | ||
submission_date: 2013/05/13 | ||
information_domain: Host | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
title: SMB Copy and Execution | ||
submission_date: 2013/05/13 | ||
information_domain: 'Host, Network' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
title: Suspicious Arguments | ||
submission_date: 2013/07/05 | ||
information_domain: Host | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
title: RDP Connection Detection | ||
submission_date: 2013/07/24 | ||
information_domain: 'Analytic, Network' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.