Skip to content

Conversation

@PratikMahajan
Copy link
Contributor

No description provided.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: PratikMahajan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 4, 2025
@DavidHurta
Copy link
Contributor

/cc

@openshift-ci openshift-ci bot requested a review from DavidHurta November 4, 2025 17:12
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2025

@PratikMahajan: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/yaml-lint 713a3a4 link true /test yaml-lint
ci/prow/cargo-test 713a3a4 link true /test cargo-test

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@DavidHurta DavidHurta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few notes and requests for changes.

Is there also a Jira we can link the PR to using the PR title?

Comment on lines +15 to +19
podman run --rm \
-v $(pwd)/rapidast-config.yaml:/tmp/config.yaml \
-v $(pwd)/results:/opt/rapidast/results \
quay.io/redhatproductsecurity/rapidast:latest \
--config /tmp/config.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running the command as is results in (with a modified results directory permissions):

$ podman run   -v $(pwd)/rapidast-config.yaml:/tmp/config.yaml   -v $(pwd)/results:/opt/rapidast/results   quay.io/redhatproductsecurity/rapidast:latest   --config /tmp/config.yaml
Traceback (most recent call last):
  File "/opt/rapidast/./rapidast.py", line 625, in <module>
    run()
  File "/opt/rapidast/./rapidast.py", line 348, in run
    validate_config_schema(config_file)
  File "/opt/rapidast/./rapidast.py", line 293, in validate_config_schema
    config = yaml.safe_load(load_config_file(config_file))
  File "/opt/rapidast/./rapidast.py", line 91, in load_config_file
    return open(config_file_location, mode="r", encoding="utf-8")
PermissionError: [Errno 13] Permission denied: '/tmp/config.yaml'

I had a look at the respective docs. They reference the usage of :Z regarding the permissions on the mounts.

podman pull quay.io/redhatproductsecurity/rapidast:latest

# Create results directory
mkdir -p results
Copy link
Contributor

@DavidHurta DavidHurta Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running the following podman command as is results in:

$ podman run   -v $(pwd)/rapidast-config.yaml:/tmp/config.yaml:Z   -v $(pwd)/results:/opt/rapidast/results:Z   quay.io/redhatproductsecurity/rapidast:latest   --config /tmp/config.yaml
INFO:Validating configuration
INFO:Configuration is valid
INFO:Starting the redaction and dumping process for the configuration file: /tmp/config.yaml
ERROR:Error occurred while dumping redacted config: [Errno 13] Permission denied: './results/openshift-upgrades-api'
ERROR:Failed to dump configuration. Exiting.

I had a look at the respective docs. They reference running $ chmod o+w ./results after creating the directory. This fixes the issue for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am a mac user (same as Pratik?), the exact command works for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Could we add dist/rapidast/results/ into .gitignore?

-v $(pwd)/rapidast-config.yaml:/tmp/config.yaml \
-v $(pwd)/results:/opt/rapidast/results \
quay.io/redhatproductsecurity/rapidast:latest \
--config /tmp/config.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: We can omit the --config flag if we utilize the default configuration path /opt/rapidast/config/config.yaml for the mount. Noting this in case you find it helpful.

# 10054: Cookie without SameSite Attribute (not applicable)
# 10112: Session Management Response Identified (not applicable)
disabledRules: "10054,10112"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I have quickly found out that html reports are supported! Could we add them as a format for a human-readable output? Although that may depend on how the configuration is to be consumed, which is not clear to me at the moment.

Suggested change
report:
format: ["json","html"]

@DavidHurta
Copy link
Contributor

The ci/prow/yaml-lint job needs to be addressed.

And the cargo-test is failing?? 👀

Copy link
Member

@hongkailiu hongkailiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scanning result looks not bad.
2 Low and 1 Informative risks. 😄

@@ -0,0 +1,26 @@
# RapidAST Security Scanning

Run automated security scans against OpenShift APIs using RapidAST container.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: to keep consistent with last section in the page.

Suggested change
Run automated security scans against OpenShift APIs using RapidAST container.
Run automated security scans against OpenShift upgrades APIs using RapidAST container.

podman pull quay.io/redhatproductsecurity/rapidast:latest

# Create results directory
mkdir -p results
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am a mac user (same as Pratik?), the exact command works for me.


# Additional ZAP extensions
miscOptions:
additionalAddons: "ascanrulesBeta" # Beta active scan rules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is ascanrulesBeta for?
I cannot see its meaning in https://github.com/search?q=repo%3ARedHatProductSecurity%2Frapidast%20ascanrulesBeta&type=code

I cannot tell the difference either in the generated report withoutmiscOptions.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants