Concept Shippable Response Plans - #3803
Conversation
pyth0n1c
left a comment
There was a problem hiding this comment.
I would not mix the python files and schema files in the same directory. Inside of the response_templates directory, I would probably have:
merged_response_templates/ - exactly as it is today
either in merged_response_templates/bin or .github/workflows/response_templates/ - template_script.py, validate_response_templates.py, mcopenapi_public.yml (I would convert this to yml not yaml, for consistency with the rest of the security_content repo, even if what the team provided was yaml)
I make this recommendation as there is no other "code" in the security_content repo other than the code which lives in the .github folder for use during CI/CD
Moved |
pyth0n1c
left a comment
There was a problem hiding this comment.
A little more feedback around organization and fixing a pre-existing deficiency in the build.yml workflow.
|
Tested security_content gitlab fetching from this feature branch: https://cd.splunkdev.com/threat-research/security_content/-/pipelines/32509507 The |
Appropriate changes have been made in a few different iterations.
Dismissing my review.
Details
This PR adds response templates to security_content repo:
response_templates/*.json: Response templates provided by the response templates team.github/workflows/response_templates/template_script.py: Script provided by the response templates team, which provides functionality merged different versions response templates and generate manifest file of response templates..github/workflows/response_templates/validate_response_templates.py: Script to validate response templates usingDraft7Validatorwith provided OpenAPI spec from the response templates team.github/workflows/response_templates/mcopenapi_public.yaml.github/workflows/build.yml: Add upload ofdist/api..github/workflows/build-response-templates.yml: Workflow to build merged response templates and validate response templates on push/PR.Checklist
<platform>_<mitre att&ck technique>_<short description>nomenclatureThe update doesn't have impact to detections related. Below is the screenshot of build-response-templates workflow:
Notes For Submitters and Reviewers
buildCI job when it fails will likely show an error about what is failing. You may have a very descriptive error of the specific field(s) in the specific file(s) that is causing an issue. In some cases, its also possible there is an issue with the YAML. Many of these can be caught with the pre-commit hooks if you set them up. These errors will be less descriptive as to what exactly is wrong, but will give you a column and row position in a specific file where the YAML processing breaks. If you're having trouble with this, feel free to add a comment to your PR tagging one of the maintainers and we'll be happy to help troubleshoot it.