Skip to content

Add support for 'method' parameter in Replacer 'add_rule'#164

Merged
thc202 merged 2 commits intozaproxy:mainfrom
acardnell-intruder:support-method-param-in-replace-add-rule
Apr 27, 2026
Merged

Add support for 'method' parameter in Replacer 'add_rule'#164
thc202 merged 2 commits intozaproxy:mainfrom
acardnell-intruder:support-method-param-in-replace-add-rule

Conversation

@acardnell-intruder
Copy link
Copy Markdown
Contributor

I saw the option to specify a method when adding Replacer rules was recently added to the API, but I wasn't able to use it with the Python library because it hasn't been exposed yet, so thought I would create a PR myself. Hope that's okay!

Please let me know if there is anything more you need from me or that is missing.

@psiinon
Copy link
Copy Markdown
Member

psiinon commented Apr 24, 2026

Logo
Checkmarx One – Scan Summary & Details634dcae1-a017-42ac-ab12-9305769449fd

Great job! No new security vulnerabilities introduced in this pull request


Use @Checkmarx to interact with Checkmarx PR Assistant.
Examples:
@Checkmarx how are you able to help me?
@Checkmarx rescan this PR

@thc202
Copy link
Copy Markdown
Member

thc202 commented Apr 24, 2026

Did you use the client generator?

@acardnell-intruder
Copy link
Copy Markdown
Contributor Author

I've tried, but I get an error and I'm not familiar enough with Java builds on what the problem is (or rather, where to fix it):

* Exception is:
org.gradle.internal.execution.WorkValidationException: A problem was found with the configuration of task ':addOns:allinonenotes:generatePythonZapApiClientFiles' (type 'GenerateApiClientFiles').
  - In plugin 'org.zaproxy.add-on' type 'org.zaproxy.gradle.addon.apigen.tasks.GenerateApiClientFiles' property 'api' doesn't have a configured value.
    
    Reason: This property isn't marked as optional and no value has been configured.
    
    Possible solutions:
      1. Assign a value to 'api'.
      2. Mark property 'api' as optional.

@thc202
Copy link
Copy Markdown
Member

thc202 commented Apr 24, 2026

Use --continue or just generate for the replacer :aO:replacer:generatePythonZapApiClientFiles.

The changelog needs to be updated.

@acardnell-intruder acardnell-intruder force-pushed the support-method-param-in-replace-add-rule branch 2 times, most recently from e33eda7 to b9b630b Compare April 24, 2026 20:47
@acardnell-intruder
Copy link
Copy Markdown
Contributor Author

Ah great, running :aO:replacer:generatePythonZapApiClientFiles resolved the issue. Thanks.

Hopefully the changes are okay now.

@kingthorin
Copy link
Copy Markdown
Member

To address the DCO requirement you'll need to sign-off the commit(s):

Signed-off-by: Arran Cardnell <arran.cardnell@intruder.io>
@acardnell-intruder acardnell-intruder force-pushed the support-method-param-in-replace-add-rule branch from b9b630b to e19b286 Compare April 27, 2026 08:53
@acardnell-intruder
Copy link
Copy Markdown
Contributor Author

To address the DCO requirement you'll need to sign-off the commit(s):

Understood - done, thanks!

Comment thread CHANGELOG.md Outdated
Removed the unreleased version section in CHANGELOG.md.

Signed-off-by: acardnell-intruder <103442492+acardnell-intruder@users.noreply.github.com>
@thc202 thc202 enabled auto-merge (squash) April 27, 2026 10:42
@thc202
Copy link
Copy Markdown
Member

thc202 commented Apr 27, 2026

Thank you!

@thc202 thc202 merged commit 923cf24 into zaproxy:main Apr 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants