diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 580d9f21c0..d258e9acdf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @patel-bhavin @P4T12ICK \ No newline at end of file +* @patel-bhavin @P4T12ICK @ljstella @MHaggis @pyth0n1c \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 627ed9d5e9..0056901de6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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" \ No newline at end of file diff --git a/.github/workflows/appinspect.yml b/.github/workflows/appinspect.yml new file mode 100644 index 0000000000..b71adb20c6 --- /dev/null +++ b/.github/workflows/appinspect.yml @@ -0,0 +1,47 @@ +name: appinspect +on: +- pull_request_target + +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 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13e95e8001..f14cf8b3e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index 9293c32204..6ef4c2b58f 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -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 @@ -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