Skip to content

Commit 893725a

Browse files
authored
Merge pull request #167 from splunk/test_against_escu
add testing against security_content repo
2 parents bfe98c9 + 3d18a24 commit 893725a

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# The default branch of security_content should always be correct.
2+
# As such, we should use it in our test workflow, here, to ensure
3+
# that contentctl is also correct and does not throw unexpected errors.
4+
5+
# We should remember that if contentctl introduces NEW validations that have
6+
# note yet been fixed in security_content, we may see this workflow fail.
7+
name: test_against_escu
8+
on:
9+
push:
10+
pull_request:
11+
types: [opened, reopened]
12+
schedule:
13+
- cron: "44 4 * * *"
14+
15+
jobs:
16+
smoketest_escu:
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python_version: ["3.11", "3.12"]
21+
operating_system: ["ubuntu-20.04", "ubuntu-22.04", "macos-latest", "macos-14"]
22+
#operating_system: ["ubuntu-20.04", "ubuntu-22.04", "macos-latest"]
23+
24+
25+
runs-on: ${{ matrix.operating_system }}
26+
steps:
27+
# Checkout the current branch of contentctl repo
28+
- name: Checkout repo
29+
uses: actions/checkout@v4
30+
31+
# Checkout the develop (default) branch of security_content
32+
- name: Checkout repo
33+
uses: actions/checkout@v4
34+
with:
35+
path: security_content
36+
repository: splunk/security_content
37+
38+
#Install the given version of Python we will test against
39+
- name: Install Required Python Version
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: ${{ matrix.python_version }}
43+
architecture: "x64"
44+
45+
- name: Install Poetry
46+
run:
47+
python -m pip install poetry
48+
49+
- name: Install contentctl and activate the shell
50+
run: |
51+
poetry install --no-interaction
52+
53+
54+
- name: Clone the AtomicRedTeam Repo (for extended validation)
55+
run: |
56+
cd security_content
57+
git clone --depth 1 https://github.com/redcanaryco/atomic-red-team
58+
59+
60+
# We do not separately run validate and build
61+
# since a build ALSO performs a validate
62+
- name: Run contentctl build
63+
run: |
64+
cd security_content
65+
poetry run contentctl build --enrichments
66+
67+
# Do not run a test - it will take far too long!
68+
# Do not upload any artifacts
69+

0 commit comments

Comments
 (0)