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

Aaronjeline/logmore #137

Merged
merged 3 commits into from
Nov 1, 2023
Merged

Aaronjeline/logmore #137

merged 3 commits into from
Nov 1, 2023

Conversation

aaronjeline
Copy link
Contributor

Issue #, if available:
N/A
Description of changes:
Provides the ability to log the corpus generated.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment on lines -35 to 53
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize)]
struct FuzzTargetInput {
/// generated schema
#[serde(skip)]
pub schema: Schema,
/// generated entity slice
#[serde(skip)]
pub entities: Entities,
/// Should we pre-evaluate entity attributes
#[serde(skip)]
pub should_cache_entities: bool,
/// generated policy
pub policy: ABACPolicy,
/// the requests to try for this hierarchy and policy. We try 8 requests per
/// policy/hierarchy
#[serde(skip)]
pub requests: [ABACRequest; 8],
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would expect serialize to include most of these fields. Can we just call serialize on .policy if this is what we want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nah, because I need it to be the FuzzTargetInput so I can log all of them via the macro easily.

cedar-drt/fuzz/src/abac_type_directed.rs Show resolved Hide resolved

## Logging

If the fuzz targets are compiled with the `log` features, then they will log their entire corpus to the file pointed at in the `LOGFILE` environment variable.
Copy link
Contributor

Choose a reason for hiding this comment

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

idk if "corpus" is the right word here -- does "corpus" imply some amount of minimization?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so, "corpus minimization" is a second step one applies to the corpus

@aaronjeline aaronjeline merged commit 6534cec into main Nov 1, 2023
2 checks passed
@aaronjeline aaronjeline deleted the aaronjeline/logmore branch November 1, 2023 13:39
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.

4 participants