Skip to content

Commit 9ff0bc6

Browse files
authored
add testing against security_content
repo to catch additonal errors with more content
1 parent d94aa7b commit 9ff0bc6

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
path: 'security_content'
35+
repository: 'https://github.com/splunk/security_content'
36+
37+
#Install the given version of Python we will test against
38+
- name: Install Required Python Version
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: ${{ matrix.python_version }}
42+
architecture: "x64"
43+
44+
- name: Install Poetry
45+
run:
46+
python -m pip install poetry
47+
48+
- name: Install contentctl and activate the shell
49+
run: |
50+
poetry install --no-interaction
51+
52+
53+
- name: Clone the AtomicRedTeam Repo (for extended validation)
54+
run: |
55+
cd security_content
56+
git clone --depth 1 https://github.com/redcanaryco/atomic-red-team
57+
58+
59+
# We do not separately run validate and build
60+
# since a build ALSO performs a validate
61+
- name: Run contentctl build
62+
run: |
63+
cd security_content
64+
poetry run contentctl build --enrichments
65+
66+
# Do not run a test - it will take far too long!
67+
# Do not upload any artifacts
68+

0 commit comments

Comments
 (0)