oracle / macaron

Macaron is an extensible supply-chain security analysis framework from Oracle Labs that supports a wide range of build systems and CI/CD services. It can be used to prevent supply chain attacks or check conformance to frameworks, such as SLSA. Documentation:
https://oracle.github.io/macaron/
Universal Permissive License v1.0
131 stars 20 forks source link

Default output dir for integration tests causes issues with pre-commit checks #173

Open behnazh-w opened 1 year ago

behnazh-w commented 1 year ago

The default output directory for integration tests is output/ directory, which can cause issues when these tests are run locally.

As part of integration tests we clone Git repository under output/. Now if we run make check without removing output/, pre-commit picks up files in these cloned repositories (even though output is part of Macaron's .gitignore) based on their individual .gitignore files.

I can think of two solutions:

  1. Use a path outside the current workspace for integration test output directory, but picking a path that would also work on GitHub Actions Runner might not be straightforward.
  2. Clean up and remove the integration tests output directory after tests finish (which will make tests slower as we won't cache the cloned repositories anymore).
tromai commented 1 month ago

I think we should close this issue because now we create the output directory within the test case directory itself, and not on the root path (of the cloned Macaron repo) any more.