Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
128 changes: 0 additions & 128 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,134 +418,6 @@ workflows:
build-and-test:
jobs:
- check-ci-definition
- format:
name: Verify formatting
requires:
- check-ci-definition
- shellcheck:
name: run shellcheck on shell scripts
requires:
- check-ci-definition
- build:
matrix:
parameters:
arch:
- amd64
- arm64
nginx-version:
- 1.22.1
- 1.24.0
- 1.25.4
- 1.27.3
waf:
- "ON"
- "OFF"
name: build << matrix.nginx-version >> on << matrix.arch >> WAF << matrix.waf >>
- build_openresty:
matrix:
parameters:
arch:
- amd64
- arm64
resty-version:
- 1.27.1.1
waf:
- "ON"
- "OFF"
name: build openresty << matrix.resty-version >> on << matrix.arch >> WAF << matrix.waf >>
- build_ingress_nginx_module:
matrix:
parameters:
arch:
- amd64
- arm64
version:
- 1.12.0
name: build ingress-nginx-<< matrix.version >> on << matrix.arch >>
- coverage:
name: Coverage on 1.27.0 with WAF ON
- test:
matrix:
parameters:
arch:
- amd64
- arm64
base-image:
- nginx:1.27.3-alpine
- nginx:1.27.3
nginx-version:
- 1.27.3
waf:
- "ON"
- "OFF"
name: test << matrix.nginx-version >> on << matrix.base-image >>:<< matrix.arch >> WAF << matrix.waf >>
requires:
- build << matrix.nginx-version >> on << matrix.arch >> WAF << matrix.waf >>
- test-openresty:
matrix:
parameters:
arch:
- amd64
- arm64
base-image:
- openresty/openresty:1.27.1.1-alpine
resty-version:
- 1.27.1.1
waf:
- "ON"
- "OFF"
name: test openresty << matrix.resty-version >> on << matrix.base-image >>:<< matrix.arch >> WAF << matrix.waf >>
requires:
- build openresty << matrix.resty-version >> on << matrix.arch >> WAF << matrix.waf >>
- test:
matrix:
parameters:
arch:
- amd64
- arm64
base-image:
- amazonlinux:2.0.20230418.0
nginx-version:
- 1.22.1
waf:
- "ON"
- "OFF"
name: test << matrix.nginx-version >> on << matrix.base-image >>:<< matrix.arch >> WAF << matrix.waf >>
requires:
- build << matrix.nginx-version >> on << matrix.arch >> WAF << matrix.waf >>
- test:
matrix:
parameters:
arch:
- amd64
- arm64
base-image:
- amazonlinux:2023.3.20240219.0
nginx-version:
- 1.24.0
waf:
- "ON"
- "OFF"
name: test << matrix.nginx-version >> on << matrix.base-image >>:<< matrix.arch >> WAF << matrix.waf >>
requires:
- build << matrix.nginx-version >> on << matrix.arch >> WAF << matrix.waf >>
- test_ingress:
matrix:
parameters:
arch:
- amd64
- arm64
base-image:
- registry.k8s.io/ingress-nginx/controller
nginx-version:
- 1.12.0
name: test ingress-nginx-<< matrix.nginx-version >> on << matrix.arch >>
requires:
- build ingress-nginx-<< matrix.nginx-version >> on << matrix.arch >>
- system_tests:
name: Run system tests
requires:
- build 1.25.4 on amd64 WAF ON
when:
and:
- not: << pipeline.git.tag >>
Expand Down
132 changes: 0 additions & 132 deletions .circleci/src/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,135 +4,3 @@ when:
- not: << pipeline.parameters.build_all >>
jobs:
- check-ci-definition
- format:
name: Verify formatting
requires:
- check-ci-definition
- shellcheck:
name: run shellcheck on shell scripts
requires:
- check-ci-definition
- build:
matrix:
parameters:
arch:
- amd64
- arm64
nginx-version:
- 1.22.1
- 1.24.0
- 1.25.4
- 1.27.3
waf:
- 'ON'
- 'OFF'
name: build << matrix.nginx-version >> on << matrix.arch >> WAF << matrix.waf >>
- build_openresty:
matrix:
parameters:
arch:
- amd64
- arm64
resty-version:
- 1.27.1.1
waf:
- 'ON'
- 'OFF'
name: build openresty << matrix.resty-version >> on << matrix.arch >> WAF << matrix.waf >>
- build_ingress_nginx_module:
name: build ingress-nginx-<< matrix.version >> on << matrix.arch >>
matrix:
parameters:
arch:
- 'amd64'
- 'arm64'
version:
- 1.12.0
- coverage:
name: Coverage on 1.27.0 with WAF ON
- test:
matrix:
parameters:
arch:
- amd64
- arm64
waf:
- 'ON'
- 'OFF'
base-image:
- nginx:1.27.3-alpine
- nginx:1.27.3
nginx-version:
- 1.27.3
name: test << matrix.nginx-version >> on << matrix.base-image >>:<< matrix.arch
>> WAF << matrix.waf >>
requires:
- build << matrix.nginx-version >> on << matrix.arch >> WAF << matrix.waf
>>
- test-openresty:
matrix:
parameters:
arch:
- amd64
- arm64
waf:
- 'ON'
- 'OFF'
base-image:
- openresty/openresty:1.27.1.1-alpine
resty-version:
- 1.27.1.1
name: test openresty << matrix.resty-version >> on << matrix.base-image >>:<< matrix.arch >> WAF << matrix.waf >>
requires:
- build openresty << matrix.resty-version >> on << matrix.arch >> WAF << matrix.waf >>
- test:
matrix:
parameters:
arch:
- amd64
- arm64
waf:
- 'ON'
- 'OFF'
base-image:
- amazonlinux:2.0.20230418.0
nginx-version:
- 1.22.1
name: test << matrix.nginx-version >> on << matrix.base-image >>:<< matrix.arch
>> WAF << matrix.waf >>
requires:
- build << matrix.nginx-version >> on << matrix.arch >> WAF << matrix.waf
>>
- test:
matrix:
parameters:
arch:
- amd64
- arm64
waf:
- 'ON'
- 'OFF'
base-image:
- amazonlinux:2023.3.20240219.0
nginx-version:
- 1.24.0
name: test << matrix.nginx-version >> on << matrix.base-image >>:<< matrix.arch >> WAF << matrix.waf >>
requires:
- build << matrix.nginx-version >> on << matrix.arch >> WAF << matrix.waf >>
- test_ingress:
name: test ingress-nginx-<< matrix.nginx-version >> on << matrix.arch >>
requires:
- build ingress-nginx-<< matrix.nginx-version >> on << matrix.arch >>
matrix:
parameters:
arch:
- amd64
- arm64
base-image:
- registry.k8s.io/ingress-nginx/controller
nginx-version:
- 1.12.0
- system_tests:
name: Run system tests
requires:
- build 1.25.4 on amd64 WAF ON
25 changes: 25 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

No explicit permissions set for at the workflow level (...read more)

Datadog’s GitHub organization defines default permissions for the GITHUB_TOKEN to be restricted (contents:read, metadata:read, and packages:read).

Your repository may require a different setup, so consider defining permissions for each job following the least privilege principle to restrict the impact of a possible compromise.

You can find the list of all possible permissions in Workflow syntax for GitHub Actions - GitHub Docs. They can be defined at the job or the workflow level.

View in Datadog  Leave us feedback  Documentation


on:
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight
workflow_dispatch: {}
pull_request:
branches:
- "**"

jobs:
update-rules:
runs-on: ubuntu-latest
permissions:
actions: read # read secrets
contents: write # Creates a branch
pull-requests: write # Creates a PR
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: actions/checkout@v4

Choose a reason for hiding this comment

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

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

When using a third party action, one needs to provide its GitHub path (owner/project) and can eventually pin it to a Git ref (a branch name, a Git tag, or a commit hash).

No pinned Git ref means the action uses the latest commit of the default branch each time it runs, eventually running newer versions of the code that were not audited by Datadog. Specifying a Git tag is better, but since they are not immutable, using a full length hash is recommended to make sure the action content is actually frozen to some reviewed state.

Be careful however, as even pinning an action by hash can be circumvented by attackers still. For instance, if an action relies on a Docker image which is itself not pinned to a digest, it becomes possible to alter its behaviour through the Docker image without actually changing its hash. You can learn more about this kind of attacks in Unpinnable Actions: How Malicious Code Can Sneak into Your GitHub Actions Workflows. Pinning actions by hash is still a good first line of defense against supply chain attacks.

Additionally, pinning by hash or tag means the action won’t benefit from newer version updates if any, including eventual security patches. Make sure to regularly check if newer versions for an action you use are available. For actions coming from a very trustworthy source, it can make sense to use a laxer pinning policy to benefit from updates as soon as possible.

View in Datadog  Leave us feedback  Documentation

with:
repository: 'DataDog/appsec-event-rules'
token: ${{ secrets.PAT_APPSEC_ACCESS }}
path: 'appsec-event-rules'
Loading