Skip to content

Add more appsec integration tests#3629

Draft
estringana wants to merge 4 commits intomasterfrom
estringana/add-more-integration-tests
Draft

Add more appsec integration tests#3629
estringana wants to merge 4 commits intomasterfrom
estringana/add-more-integration-tests

Conversation

@estringana
Copy link
Contributor

Description

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@datadog-official
Copy link

datadog-official bot commented Feb 6, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1036 Tests failed

span contains runtime id meta() from com.datadog.appsec.php.integration.Apache2FpmTests (Datadog) (Fix with Cursor)
Assertion failed: 

assert span.meta."_dd.runtime_id" instanceof String
       |    |    |                |
       |    |    null             false
       |    ['http.url':'http://docker:32770/hello.php', '_dd.p.dm':'-1', 'env':'integration', 'http.client_ip':'172.17.0.1', 'http.status_code':'200', 'http.request.headers.user-agent':'Java-http-client/17.0.15', '_dd.appsec.event_rules.version':'1.4.3', 'http.endpoint':'/hello.php', '_dd.runtime_family':'php', 'runtime-id':'f8bf9514-1d2c-480d-af50-65402ff3175b', 'http.request.headers.content-length':'0', 'http.method':'GET', 'http.useragent':'Java-http-client/17.0.15']
       com.datadog.appsec.php.model.Span@f810c18

Assertion failed: 

...
custom cookie rule matches and reports parameter path() from com.datadog.appsec.php.integration.RemoteConfigTests (Datadog) (Fix with Cursor)
groovy.lang.MissingMethodException: No signature of method: com.datadog.appsec.php.integration.RemoteConfigTests.assertThat() is applicable for argument types: (String, com.datadog.appsec.php.test.JsonMatcher) values: [{"triggers":[{"rule":{"id":"cookie_rule","name":"cookie_rule","tags":{"category":"attack_attempt","type":"security_scanner"},"on_match":["block"]},"rule_matches":[{"operator":"match_regex","operator_value":"(?i)bad","parameters":[{"address":"server.request.cookies","key_path":["session"],"value":"bad","highlight":["bad"]}]}],"security_response_id":"49a2e594-f378-43e9-1bf8-e49ac3d8edfc"}]}, ...]

groovy.lang.MissingMethodException: No signature of method: com.datadog.appsec.php.integration.RemoteConfigTests.assertThat() is applicable for argument types: (String, com.datadog.appsec.php.test.JsonMatcher) values: [{"triggers":[{"rule":{"id":"cookie_rule","name":"cookie_rule","tags":{"category":"attack_attempt","type":"security_scanner"},"on_match":["block"]},"rule_matches":[{"operator":"match_regex","operator_value":"(?i)bad","parameters":[{"address":"server.request.cookies","key_path":["session"],"value":"bad","highlight":["bad"]}]}],"security_response_id":"49a2e594-f378-43e9-1bf8-e49ac3d8edfc"}]}, ...]
	at app//org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:73)
	at app//org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures.unwrap(IndyGuardsFiltersAndSignatures.java:163)
	at app//org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
	at app//com.datadog.appsec.php.integration.RemoteConfigTests.custom cookie rule matches and reports parameter path(RemoteConfigTests.groovy:323)
	at java.base@17.0.15/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base@17.0.15/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base@17.0.15/java.util.ArrayList.forEach(ArrayList.java:1511)
custom header rule matches and reports parameter path() from com.datadog.appsec.php.integration.RemoteConfigTests (Datadog) (Fix with Cursor)
groovy.lang.MissingMethodException: No signature of method: com.datadog.appsec.php.integration.RemoteConfigTests.assertThat() is applicable for argument types: (String, com.datadog.appsec.php.test.JsonMatcher) values: [{"triggers":[{"rule":{"id":"header_rule","name":"header_rule","tags":{"category":"attack_attempt","type":"security_scanner"},"on_match":["block"]},"rule_matches":[{"operator":"match_regex","operator_value":"^foo$","parameters":[{"address":"server.request.headers.no_cookies","key_path":["x-demo-header"],"value":"foo","highlight":["foo"]}]}],"security_response_id":"3e7d9d20-30b9-401a-1b89-b1e017f447dc"}]}, ...]

groovy.lang.MissingMethodException: No signature of method: com.datadog.appsec.php.integration.RemoteConfigTests.assertThat() is applicable for argument types: (String, com.datadog.appsec.php.test.JsonMatcher) values: [{"triggers":[{"rule":{"id":"header_rule","name":"header_rule","tags":{"category":"attack_attempt","type":"security_scanner"},"on_match":["block"]},"rule_matches":[{"operator":"match_regex","operator_value":"^foo$","parameters":[{"address":"server.request.headers.no_cookies","key_path":["x-demo-header"],"value":"foo","highlight":["foo"]}]}],"security_response_id":"3e7d9d20-30b9-401a-1b89-b1e017f447dc"}]}, ...]
	at app//org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:73)
	at app//org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures.unwrap(IndyGuardsFiltersAndSignatures.java:163)
	at app//org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
	at app//com.datadog.appsec.php.integration.RemoteConfigTests.custom header rule matches and reports parameter path(RemoteConfigTests.groovy:390)
	at java.base@17.0.15/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base@17.0.15/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base@17.0.15/java.util.ArrayList.forEach(ArrayList.java:1511)
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f91fbf3 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.11%. Comparing base (f1d36ca) to head (f91fbf3).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3629      +/-   ##
==========================================
- Coverage   62.21%   62.11%   -0.11%     
==========================================
  Files         141      141              
  Lines       13387    13387              
  Branches     1753     1753              
==========================================
- Hits         8329     8315      -14     
- Misses       4260     4273      +13     
- Partials      798      799       +1     

see 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1d36ca...f91fbf3. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants