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

Configure lint-mitre to ignore schema test files #1381

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

ben-githubs
Copy link
Contributor

Background

Schema test files typically contain multiple documents, separated by dashes. The Analysis Spec loader used by Panther Analysis Tool doesn't support such files, and causes errors if they are present in the repo when make lint-mitre is run. Since schema tests do not contain MITRE mappings, we added an exclusion pattern to prevent schema test files from being loaded by the script.

Changes

  • Added a check to ignore any files with names matching *_tests.y*ml from the linting script

Testing

  • Tested script with several schema test files in repo, each containing multiple documents, and confirmed that no errors occurred

@ben-githubs ben-githubs requested a review from a team as a code owner October 9, 2024 15:20
@geoffg-sentry
Copy link
Contributor

Thanks ben 🫡

@arielkr256 arielkr256 added bug Something isn't working github_actions Pull requests that update GitHub Actions code labels Oct 15, 2024
@arielkr256 arielkr256 enabled auto-merge (squash) October 15, 2024 01:54
Copy link

😱
looks like some things could be wrong with the packs

@arielkr256 arielkr256 merged commit 139d405 into develop Oct 15, 2024
9 checks passed
@arielkr256 arielkr256 deleted the ASK-802/mitre-script-schema-tests branch October 15, 2024 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants