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

build: go: switch rules location #1772

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Conversation

eliottness
Copy link
Contributor

@eliottness eliottness commented Oct 30, 2023

Description

The recommended ruleset was moved from dd-trace-go/internal/appsec/rules.json to appsec-internal-go/appsec/rules.json (blocked by DataDog/dd-trace-go#2312). Since this script references the rules location to extract its version so we need to modify it.

Motivation

We are moving the recommended ruleset from dd-trace-go to appsec-internal-go to centralize some code between the datadog-agent repo and the dd-trace-go repo.

Workflow

  1. ⚠️⚠️ Create your PR as draft
  2. Follow the style guidelines of this project (See how to easily lint the code)
  3. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  4. Mark it as ready for review

Once your PR is reviewed, you can merge it! ❤️

Reviewer checklist

  • Check what scenarios are modified. If needed, add the relevant label (run-parametric-scenario, run-profiling-scenario...). If this PR modifies any system-tests internal, then add the run-all-scenarios label (more info).
  • CI is green
    • If not, failing jobs are not related to this change (and you are 100% sure about this statement)
  • if any of build-some-image label is present
    1. is the image labl have been updated ?
    2. just before merging, locally build and push the image to hub.docker.com
  • if a scenario is added (or removed), add (or remove) it in system-test-dasboard nightly

The recommended ruleset was moved from dd-trace-go/internal/appsec/rules.json to appsec-internal-go/appsec/rules.json. Since this script references the rules location to extract its version, we need to modify it
@Hellzy
Copy link
Contributor

Hellzy commented Oct 30, 2023

Linking the system-tests run of this change plus the dd-trace-go one combined here as well: https://github.com/DataDog/dd-trace-go/actions/runs/6695124720

@eliottness eliottness marked this pull request as ready for review October 30, 2023 16:01
@eliottness eliottness requested review from a team as code owners October 30, 2023 16:01
@eliottness eliottness merged commit c80bced into main Oct 30, 2023
153 of 154 checks passed
@eliottness eliottness deleted the eliott.bouhana/APPSEC-11819 branch October 30, 2023 16:16
@cbeauchesne
Copy link
Collaborator

is it working when the rules is specified threw env var ?

@Julio-Guerra
Copy link
Contributor

is it working when the rules is specified threw env var ?

No it doesn't - how do you do it in other libs?

@cbeauchesne
Copy link
Collaborator

nevermind, it's handled after the script modified in this PR. As long as the file SYSTEM_TESTS_APPSEC_EVENT_RULES_VERSION is present it's ok.

Though, for later PR that modify weblogs, it's a good habit to run all scenarios (run-all-scenario label), or at least the subset run-appsec-scenarios.

DDJavierSantos pushed a commit that referenced this pull request Nov 2, 2023
* build: go: switch rules location

The recommended ruleset was moved from dd-trace-go/internal/appsec/rules.json to appsec-internal-go/appsec/rules.json. Since this script references the rules location to extract its version, we need to modify it

* add appsec-internal-go as contigent when the ruleset is not available in dd-trace-go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants