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

Adding App Inspect CI job #3075

Merged
merged 20 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @patel-bhavin @P4T12ICK
* @patel-bhavin @P4T12ICK @ljstella @MHaggis @pyth0n1c
5 changes: 2 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: 2
updates:
- package-ecosystem: pip
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 6
interval: "weekly"
48 changes: 48 additions & 0 deletions .github/workflows/appinspect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: appinspect
on:
pull_request_target:
branches:
- develop
jobs:
appinspect:
#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
env:
CONTENTCTL_VERSION: ${{ vars.CONTENTCTL_VERSION }}
steps:
- name: Check out the repository code
uses: actions/checkout@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


- name: Install Python Dependencies and ContentCTL and Atomic Red Team
run: |
echo "CONTENTCTL_VERSION is set to ${{ env.CONTENTCTL_VERSION }}"
pip install contentctl==${{ env.CONTENTCTL_VERSION }}
git clone --depth=1 --single-branch --branch=master https://github.com/redcanaryco/atomic-red-team.git

- name: Running build with enrichments
env:
APPINSPECTUSERNAME: "${{ secrets.APPINSPECTUSERNAME }}"
APPINSPECTPASSWORD: "${{ secrets.APPINSPECTPASSWORD }}"
run: |
echo $APPINSPECTUSERNAME
contentctl inspect --splunk-api-username "$APPINSPECTUSERNAME" --splunk-api-password "$APPINSPECTPASSWORD" --stack_type victoria --enrichments
echo "done appinspect"
mkdir -p artifacts/app_inspect_report
cp -r dist/*.html artifacts/app_inspect_report
cp -r dist/*.tar.gz artifacts/

- name: store_artifacts
uses: actions/upload-artifact@v4
with:
name: content-latest
path: |
artifacts/DA-ESS-ContentUpdate-latest.tar.gz
artifacts/app_inspect_report
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
#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
env:
CONTENTCTL_VERSION: ${{ vars.CONTENTCTL_VERSION }} # Use the environment variable
steps:
- name: Check out the repository code
uses: actions/checkout@v4
Expand All @@ -23,7 +25,8 @@ jobs:

- name: Install Python Dependencies and ContentCTL and Atomic Red Team
run: |
pip install contentctl==4.2.0
echo "CONTENTCTL_VERSION is set to ${{ env.CONTENTCTL_VERSION }}"
pip install contentctl==${{ env.CONTENTCTL_VERSION }}
git clone --depth=1 --single-branch --branch=master https://github.com/redcanaryco/atomic-red-team.git

- name: Running build with enrichments
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ jobs:
unit-testing:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'refs/tags/')" #don't run on tags - future steps won't run either since they depend on this job
# needs: [validate-tag-if-present, quit-for-dependabot]
env:
CONTENTCTL_VERSION: ${{ vars.CONTENTCTL_VERSION }}
steps:
#For fork PRs, always check out security_content and the PR target in security content!
- name: Check out the repository code
Expand All @@ -24,7 +25,8 @@ jobs:
- name: Install Python Dependencies and ContentCTL
run: |
python -m pip install --upgrade pip
pip install contentctl==4.2.0
echo "CONTENTCTL_VERSION is set to ${{ env.CONTENTCTL_VERSION }}"
pip install contentctl==${{ env.CONTENTCTL_VERSION }}

# Running contentctl test with a few arguments, before running the command make sure you checkout into the current branch of the pull request. This step only performs unit testing on all the changes against the target-branch. In most cases this target branch will be develop
# Make sure we check out the PR, even if it actually lives in a fork
Expand Down
Loading