Skip to content

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

Open
acardnell-intruder wants to merge 1 commit intozaproxy:mainfrom
acardnell-intruder:support-method-param-in-replace-add-rule
Open

Add support for 'method' parameter in Replacer 'add_rule'#164
acardnell-intruder wants to merge 1 commit intozaproxy:mainfrom
acardnell-intruder:support-method-param-in-replace-add-rule

Conversation

@acardnell-intruder
Copy link
Copy Markdown

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 & Details4d8eef94-d2cb-4315-ae55-f3037eaa48f1

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
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 from c65a5cf to e33eda7 Compare April 24, 2026 20:43
@acardnell-intruder acardnell-intruder force-pushed the support-method-param-in-replace-add-rule branch from e33eda7 to b9b630b Compare April 24, 2026 20:47
@acardnell-intruder
Copy link
Copy Markdown
Author

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

Hopefully the changes are okay now.

@kingthorin
Copy link
Copy Markdown
Member

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