Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit-Testing using contentctl #3028

Merged
merged 77 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
cfa85d0
updating only CI files
patel-bhavin Jul 8, 2024
9827e0b
fail the search
patel-bhavin Jul 8, 2024
6ea5056
continue on error
patel-bhavin Jul 8, 2024
81de107
name update
patel-bhavin Jul 8, 2024
87cddf5
updating output
patel-bhavin Jul 8, 2024
a19f3f1
testing printouts
patel-bhavin Jul 8, 2024
aa75d4f
updating scirpt
patel-bhavin Jul 8, 2024
78ef3b8
enable testing
patel-bhavin Jul 8, 2024
f8bd881
diable tqdm and remove venv
patel-bhavin Jul 8, 2024
a75a6bd
remove pull
patel-bhavin Jul 8, 2024
d996a81
udpating git pull
patel-bhavin Jul 8, 2024
a42b0c7
updating formatting
patel-bhavin Jul 8, 2024
1f17367
testing no integration
patel-bhavin Jul 8, 2024
c16658d
git pull
patel-bhavin Jul 8, 2024
e82f484
remove no enable
patel-bhavin Jul 8, 2024
cf825c7
updating ctl command
patel-bhavin Jul 8, 2024
e4ff59d
updating syncronize
patel-bhavin Jul 8, 2024
de8e094
print branch names
patel-bhavin Jul 8, 2024
8d8f5ab
print branch names
patel-bhavin Jul 8, 2024
a02f44f
no luck with branch name
patel-bhavin Jul 8, 2024
82630b2
testing with sync
patel-bhavin Jul 8, 2024
df6eddf
ref develop
patel-bhavin Jul 8, 2024
2092c54
silent output
patel-bhavin Jul 8, 2024
513c6b2
update ctl comand
patel-bhavin Jul 8, 2024
689e003
updating validate
patel-bhavin Jul 8, 2024
0d0ba27
updating scirpt
patel-bhavin Jul 8, 2024
255f719
remove aritfacts dir
patel-bhavin Jul 8, 2024
bc28aa2
udpating formatting
patel-bhavin Jul 9, 2024
1224b2e
run full test
patel-bhavin Jul 9, 2024
fdf9d92
testing one passed detections
patel-bhavin Jul 9, 2024
3da3556
testing one more time
patel-bhavin Jul 9, 2024
a9acaa6
testing this detection
patel-bhavin Jul 9, 2024
936ede8
CI trigger
patel-bhavin Jul 9, 2024
62c75b3
fixing warning and testing a detection
patel-bhavin Jul 9, 2024
5825cd7
testing another detection
patel-bhavin Jul 9, 2024
561ab4f
testing another detection
patel-bhavin Jul 9, 2024
cf25e65
testing with python
patel-bhavin Jul 9, 2024
ff20804
format script update
patel-bhavin Jul 9, 2024
9f6ea70
testing experiemental
patel-bhavin Jul 9, 2024
2d099c2
fixing path
patel-bhavin Jul 9, 2024
5ec9d4c
warnings
patel-bhavin Jul 9, 2024
f225d26
update file path
patel-bhavin Jul 9, 2024
34f09dc
remove file
patel-bhavin Jul 9, 2024
2565742
test stder
patel-bhavin Jul 9, 2024
d26ede1
re adding summary
patel-bhavin Jul 9, 2024
afbe04f
cehck python path
patel-bhavin Jul 9, 2024
a88a7a8
wrong comments for testing
patel-bhavin Jul 9, 2024
a22076c
create sample summary
patel-bhavin Jul 9, 2024
9648a23
import sys
patel-bhavin Jul 9, 2024
f641cb9
summary has failed
patel-bhavin Jul 9, 2024
125417d
update with 0 failures
patel-bhavin Jul 9, 2024
d84aac3
updating test handlers
patel-bhavin Jul 9, 2024
9e9d16d
udpating with failures for script to fail
patel-bhavin Jul 9, 2024
78944aa
updating formatting
patel-bhavin Jul 9, 2024
6fee687
0 failures
patel-bhavin Jul 9, 2024
65b0cd5
one more test before review for passing CI
patel-bhavin Jul 9, 2024
434f7ae
final updates - real test
patel-bhavin Jul 9, 2024
9174d51
final updates - real test2
patel-bhavin Jul 9, 2024
c7eacfa
run test
patel-bhavin Jul 9, 2024
c726421
coloring
patel-bhavin Jul 9, 2024
9072925
pass-fail-colors
patel-bhavin Jul 9, 2024
8e577b3
udpates to footer
patel-bhavin Jul 9, 2024
d18dcaa
final final
patel-bhavin Jul 9, 2024
acca14f
adding overall status
patel-bhavin Jul 9, 2024
18fb21f
if conditions
patel-bhavin Jul 9, 2024
c9ae416
varaibles
patel-bhavin Jul 9, 2024
1f6ac61
updating bash variables
patel-bhavin Jul 9, 2024
19fc2a6
revert
patel-bhavin Jul 9, 2024
b1e19f8
testing formatting
patel-bhavin Jul 9, 2024
3d34823
updating print
patel-bhavin Jul 9, 2024
cdec009
CI trigger
patel-bhavin Jul 9, 2024
8d7a909
test no changes in detections
patel-bhavin Jul 9, 2024
847e67a
udpating job names
patel-bhavin Jul 9, 2024
e168286
updating to build
patel-bhavin Jul 9, 2024
a169957
testing images
patel-bhavin Jul 9, 2024
da14348
final update
patel-bhavin Jul 9, 2024
b36c64f
remove jq
patel-bhavin Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: validate-and-build
name: build
on:
push:
pull_request:
types: [opened, reopened]
types: [opened, reopened, synchronize]
jobs:

validate-and-build:
build:
#Note that the CircleCI job used a Container. The way to do this with Github Actions
#is to first start up a Virtual Machine, then we can by following:
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer
runs-on: ubuntu-latest
steps:
- name: Check out the repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11' #Available versions here - https://github.com/actions/python-versions/releases easy to change/make a matrix/use pypy
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand All @@ -23,29 +21,20 @@ jobs:
run: |
sudo apt update -qq
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this workflow needs jq (anymore) can it be removed entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed!

sudo apt install jq -qq


- name: Install Python Dependencies and ContentCTL and Atomic Red Team
run: |
python3.11 -m venv .venv
source .venv/bin/activate
pip install contentctl
git clone --depth=1 --single-branch --branch=master https://github.com/redcanaryco/atomic-red-team.git

- name: content_ctl validate
run: |
source .venv/bin/activate
contentctl validate

- name: contentctl generate
- name: Running build with enrichments
run: |
source .venv/bin/activate
contentctl build --enrichments
mkdir artifacts
mv dist/DA-ESS-ContentUpdate-latest.tar.gz artifacts/

- name: store_artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: content-latest
path: |
Expand Down
Loading
Loading