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

Release 0.4.5 Error: cannot get default rules: Error: failed to get ruleset java-best-practices #540

Open
e2e-tests-prd opened this issue Oct 30, 2024 · 1 comment

Comments

@e2e-tests-prd
Copy link

e2e-tests-prd commented Oct 30, 2024

Describe the bug
Release 0.4.5 is failing on getting the ruleset java-best-practices

To Reproduce
Steps to reproduce the behavior:

Add this stage to .gitlab-ci.yml in a node application.

dd_sast:
  stage: sast
  image: node:20
  variables:
    DATADOG_STATIC_ANALYZER_URL: "https://github.com/DataDog/datadog-static-analyzer/releases/latest/download/datadog-static-analyzer-x86_64-unknown-linux-gnu.zip"
  script:
    - echo "Installing Datadog Static Analyzer"
    - npm install -g @datadog/datadog-ci
    - curl -L -o /tmp/ddog-static-analyzer.zip $DATADOG_STATIC_ANALYZER_URL
    - unzip /tmp/ddog-static-analyzer.zip -d /tmp
    - mv /tmp/datadog-static-analyzer /usr/local/datadog-static-analyzer
    - OUTPUT_FILE="/tmp/report.sarif"
    - echo "Will output to $OUTPUT_FILE"
    - /usr/local/datadog-static-analyzer -i "./path/to/your/project" -o "$OUTPUT_FILE" -f sarif
    - echo "Uploading results to Datadog"
    - datadog-ci sarif upload --service "$DD_SERVICE_NAME" --env "$ENVIRONMENT" "$OUTPUT_FILE"
    - cp "$OUTPUT_FILE" .
  artifacts:
    paths:
      - /tmp/report.sarif
    expire_in: 1 hour
  rules:
    - if: '$CI_COMMIT_BRANCH'
      when: on_success

Expected behavior
Expected to not have an error thrown (Error: failed to get ruleset java-best-practices) on getting a ruleset that was not defined. Version 0.4.4 works as expected.

Desktop (please complete the following information):

  • OS: node:20
  • Browser CI
  • Version 0.4.5
@jasonforal
Copy link
Collaborator

Hi, this specific error message is only returned by our backend, which means what you are experiencing is unrelated to the binary (either 0.4.5, 0.4.4, or any other version).

When did you experience this error? Are you continuing to experience it?

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

No branches or pull requests

2 participants