imperva / imperva/incapsula-cli

Can not update the rule

Open
#29 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
33
Forks
12
PR merge metrics
No merged PRs in 30d

Description

According to API v2 documentation
https://docs.imperva.com/bundle/cloud-application-security/page/apiv2/cloud-waf-api-definition.htm

parameters should be in JSON format

Need add in line
https://github.com/imperva/incapsula-cli/blob/15447e71c7605a7306abf70fc1420f0ac12a3b19/cwafcli/Rules/rules.py#L74

param, "POST", param["json"])

After the change command incap rule update-rule works as expected

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cwafcli/Rules/rules.py at the referenced line and compare the update-rule request with the API v2 documentation. Run the incap rule update-rule command with a JSON-formatted parameter and confirm that the rule updates successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.