Skip to content

Bash test files (Tree-Sitter) - #320

Merged
mike-hunhoff merged 7 commits into
mandiant:masterfrom
saniyafatima07:bash-test
Aug 13, 2026
Merged

Bash test files (Tree-Sitter)#320
mike-hunhoff merged 7 commits into
mandiant:masterfrom
saniyafatima07:bash-test

Conversation

@saniyafatima07

Copy link
Copy Markdown
Contributor

Context: PR-3121

  • Adds bash test samples for tree-sitter feature.

@mr-tz

mr-tz commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

please also update .github/check_sample_filenames.py as part of this PR

@saniyafatima07

Copy link
Copy Markdown
Contributor Author

@mr-tz I have made the requested changes. Could you please take another look when u get a chance?
Thank you!

@mr-tz

mr-tz commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

CI is complaining - I don't know what you discussed but we should maybe consider storing these in a defanged version? Are these actual malware samples? Would be bad to run them by error (like for all files here of course).

@saniyafatima07

saniyafatima07 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

CI is complaining - I don't know what you discussed but we should maybe consider storing these in a defanged version? Are these actual malware samples? Would be bad to run them by error (like for all files here of course).

Sorry about that. The CI failure was due to the filename on my side. I had made a few changes to the sample but forgot to rename it back to its SHA-256 hash, so the checks failed. I have fixed it and the CI should pass now.

Also, yes, these are actual malware samples that I collected from MalwareBazaar for the test suite. I will defang both the scripts. Thank you for the review!

@mr-tz

mr-tz commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Please add documentation on how to add such files / how they are zipped (eg with a password?), then should be good to go.

@saniyafatima07
saniyafatima07 force-pushed the bash-test branch 2 times, most recently from 8c8b03e to 59208e3 Compare August 7, 2026 11:03
@saniyafatima07

Copy link
Copy Markdown
Contributor Author

Please add documentation on how to add such files / how they are zipped (eg with a password?), then should be good to go.

I’ve added a small section of documentation on how to add the bash script samples. I haven’t password-protected the ZIP files currently. Should I do that as well?

@mr-tz mr-tz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this works for me, thanks

@mandiant/capa-dev any other thoughts or concerns?

@saniyafatima07
saniyafatima07 force-pushed the bash-test branch 2 times, most recently from cf3abaf to 409f721 Compare August 13, 2026 16:32
@saniyafatima07

Copy link
Copy Markdown
Contributor Author

@mike-hunhoff Moved it back to the .sh_ approach. Could you please review it?

@mike-hunhoff mike-hunhoff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you @saniyafatima07 . See my comments about adding a guard to the bash scripts just to be extra safe.

Comment thread source/sh/1d470868c619d5999c38e88583c5e23efa5493834d3bc55f8ba6376d38240048.sh_ Outdated
Comment thread source/sh/e05e2293c9d4fece2222d00fe48fda139b8c5b1582137f228b6f4caa50cc4a6a.sh_ Outdated
@saniyafatima07

Copy link
Copy Markdown
Contributor Author

@mike-hunhoff Done.

@mike-hunhoff
mike-hunhoff merged commit a2e4451 into mandiant:master Aug 13, 2026
10 checks 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