Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR to push implementation Inline replace functionality from ARI #238

Merged
merged 9 commits into from
Jun 6, 2024

Conversation

justjais
Copy link
Contributor

@justjais justjais commented Jun 5, 2024

PR to push implementation Inline replace functionality from ARI.

Currently the --fix operation is supported/enabled with --scan-per-target command.

Steps to test:

  • Pull the PR changes
  • Run the ARI project command as below:
    ari project <local github repository> --out-dir /tmp/test --save-only-rule-result --scan-per-target --task-num-threshold 100 --fix
  • This should update the input local github repository, with all the ARI suggested mutation by performing an inline replace functionality.

Signed-off-by: Sumit Jaiswal <[email protected]>
justjais added 4 commits June 5, 2024 12:06
Signed-off-by: Sumit Jaiswal <[email protected]>
Signed-off-by: Sumit Jaiswal <[email protected]>
Signed-off-by: Sumit Jaiswal <[email protected]>
@justjais
Copy link
Contributor Author

justjais commented Jun 6, 2024

justjais added 2 commits June 6, 2024 12:18
Signed-off-by: Sumit Jaiswal <[email protected]>
Signed-off-by: Sumit Jaiswal <[email protected]>
logging.basicConfig(
level=os.environ.get('LOGLEVEL', 'WARNING').upper()
)

Copy link
Collaborator

Choose a reason for hiding this comment

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

ARI already has its own logger at ansible_risk_insight.logger and we can use it like this, so please consider using it instead of the native logging library.
If the native logging is better here, we can accept this change, but at least the environment variable should be consistent with the existing one ARI_LOG_LEVEL (ref: link)

justjais added 2 commits June 6, 2024 12:45
Signed-off-by: Sumit Jaiswal <[email protected]>
Signed-off-by: Sumit Jaiswal <[email protected]>
@hirokuni-kitahara hirokuni-kitahara merged commit 15f0f30 into ansible:main Jun 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants