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

fix bug in config redaction #233

Merged
merged 1 commit into from
Oct 30, 2024
Merged

fix bug in config redaction #233

merged 1 commit into from
Oct 30, 2024

Conversation

sfowl
Copy link
Collaborator

@sfowl sfowl commented Oct 29, 2024

Follow up to ee14d55

Before:

$ ./rapidast.py  --config ./config/config-flags.yaml
INFO:Starting the redaction and dumping process for the configuration file: {config_file_location}
INFO:Created destination directory: ./results/flags-1.0/DAST-20241030-092322-RapiDAST-flags-1.0
INFO:Redacting sensitive information from configuration ./config/config-flags.yaml
Traceback (most recent call last):
  File "/home/sfowler/code/rapidast/./rapidast.py", line 286, in <module>
    run()
  File "/home/sfowler/code/rapidast/./rapidast.py", line 226, in run
    dump_rapidast_redacted_configs(config_file, full_result_dir_path)
  File "/home/sfowler/code/rapidast/./rapidast.py", line 177, in dump_rapidast_redacted_configs
    if not dump_redacted_config(main_config_file_location, destination_dir):
  File "/home/sfowler/code/rapidast/./rapidast.py", line 152, in dump_redacted_config
    if config[key].get("authentication") and config[key]["authentication"].get("parameters"):
AttributeError: 'NoneType' object has no attribute 'get'

After:

$ ./rapidast.py  --config ./config/config-flags.yaml
INFO:Starting the redaction and dumping process for the configuration file: {config_file_location}
INFO:Created destination directory: ./results/flags-1.0/DAST-20241030-092330-RapiDAST-flags-1.0
INFO:Redacting sensitive information from configuration ./config/config-flags.yaml
INFO:Saving redacted configuration to ./results/flags-1.0/DAST-20241030-092330-RapiDAST-flags-1.0/config-flags.yaml
INFO:Redacted configuration saved successfully
INFO:Next scanner: 'zap'
INFO:Preparing ZAP configuration
INFO:ZAP NOT configured with any authentication
INFO:Saved Automation Framework in /tmp/rapidast_zap_fb_5l4xq/workdir/af.yaml
INFO:Running up the ZAP scanner on the host
INFO:Zap: verifying the viability of ZAP
ERROR:zap.sh not found in PATH, is ZAP installed?

@sfowl sfowl changed the title fix bump in config redaction fix bug in config redaction Oct 29, 2024
@sfowl
Copy link
Collaborator Author

sfowl commented Oct 29, 2024

Fixes #231

Copy link
Collaborator

@ccronca ccronca left a comment

Choose a reason for hiding this comment

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

lgtm

@sfowl sfowl merged commit edee2e9 into development Oct 30, 2024
2 checks passed
sfowl added a commit to sfowl/rapidast that referenced this pull request Nov 4, 2024
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