-
Notifications
You must be signed in to change notification settings - Fork 10
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
Nginx with AppSec support #2455
base: main
Are you sure you want to change the base?
Conversation
f89da8a
to
9bc83b3
Compare
.github/workflows/run-end-to-end.yml
Outdated
if: ${{ matrix.version == 'dev' && inputs.library == 'cpp'}} | ||
run: ./utils/scripts/load-binary.sh nginx | ||
env: | ||
CIRCLECI_TOKEN: ${{ secrets.CIRCLECI_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the previous step "Load Library binary" we only need to add the "env"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous step does:
./utils/scripts/load-binary.sh ${{ inputs.library }}
inputs.library
will be cpp. However, I need to call it with nginx
.
.github/workflows/run-end-to-end.yml
Outdated
@@ -230,7 +235,9 @@ jobs: | |||
DD_API_KEY: ${{ secrets.DD_API_KEY }} | |||
- name: Run APPSEC_MISSING_RULES scenario | |||
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"APPSEC_MISSING_RULES"') | |||
run: ./run.sh APPSEC_MISSING_RULES | |||
run: | | |||
# nginx does not start with missing rules file, thereby stalling the job |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we add this condition to "if:"?
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"APPSEC_MISSING_RULES"') && matrix.weblog != 'nginx'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try
.github/workflows/run-end-to-end.yml
Outdated
run: ./run.sh APPSEC_CORRUPTED_RULES | ||
run: | | ||
# nginx does not start with corrupted rules file, thereby stalling the job | ||
if [[ $WEBLOG_VARIANT != nginx ]]; then ./run.sh APPSEC_CORRUPTED_RULES; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same....
ced3965
to
0df2555
Compare
test_schemas.py: irrelevant (ASM is not implemented in C++) | ||
test_schemas.py: | ||
Test_Scanners: | ||
"*": irrelevant (ASM is not implemented in C++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As ASM is actually implemented, could you replace irrelevant
by missing_feature
?
So far, as nginx is the only weblog, you can probably do a simple search and replace
Test_Scanners: missing_feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASM is implemented on the nginx module, not on dd-trace-cpp. If we're collapsing the distinction because the only supported weblog is nginx, then we should stop treating nginx separately in all the places in this file, no?
@@ -89,6 +89,11 @@ jobs: | |||
uses: actions/checkout@v4 | |||
- name: Get library artifact | |||
run: ./utils/scripts/load-binary.sh ${{ matrix.library }} | |||
- name: Get nginx module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like ./utils/scripts/load-binary.sh cpp
should load both nginx and cpp, WDYT ?
@@ -143,6 +143,10 @@ def start(self) -> Container: | |||
|
|||
logger.info(f"Start container {self.container_name}") | |||
|
|||
# the whole thing is reimplemented in python... | |||
if self.healthcheck is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this change ? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a healthcheck implemented in python if the healthcheck argument is passed. In this case, there's no point also running the healthcheck defined in the docker file
Hi @cataphract , Do you need any help to fix issues/comments on this PR ? |
0df2555
to
98b4f66
Compare
98b4f66
to
f7dc232
Compare
2385524
to
f3af09f
Compare
f96b4f2
to
3db6d44
Compare
3db6d44
to
9c6ce99
Compare
Motivation
Nginx now supports AppSec. Enable those tesets
Changes
Workflow
codeowners
file quickly.🚀 Once your PR is reviewed, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
run-parametric-scenario
,run-profiling-scenario
...) are presents[<language>]
, double-check that only<language>
is impacted by the changebuild-XXX-image
label is present