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

Add support for including file path for collation #30

Merged
merged 1 commit into from
May 30, 2024

Conversation

rhyshort
Copy link
Contributor

What

Add support for including file path for collated files, this solves the problem where if you are collecting files from multiple agents, file path clashes occur. Adding the --include-file-path option will ensure that the file names are unique

Why

When harvesting evidence collected via auditree-framework's agent mode across multiple agents in a single collate run evidence gets overwritten. This means when collecting the same evidence file from multiple agents has to be achieved with a multiple runs rather than taking advantage of the feature to collect multiple files at once.

How

  • add option --include-file-path to accepted arguments, when set to true evidence located at raw/foo/foo.json would be collated as 20191106_raw_foo_foo.json

Test

  • Added test for new cli argument (test_collate_include_file_path)
  • Added test to verify file path is added to collated file name (test_write_includes_file_path)

Context

Add support for including file path for collated files, this solves the
problem where if you are collecting files from multiple agents, file
path clashes occur. Adding the --include-file-path option will ensure
that the file names are unique
Copy link
Collaborator

@cletomartin cletomartin left a comment

Choose a reason for hiding this comment

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

Thanks @rhyshort! +1

@rhyshort
Copy link
Contributor Author

@cletomartin Great thanks. Could you merge then please? I don't have commit rights :)

@drsm79 drsm79 merged commit 190cbc2 into ComplianceAsCode:main May 30, 2024
1 check 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.

3 participants