Skip to content

Fix: Protobuf output - #3151

Open
saniyafatima07 wants to merge 9 commits into
mandiant:feature/script-analysisfrom
saniyafatima07:protobuf
Open

Fix: Protobuf output#3151
saniyafatima07 wants to merge 9 commits into
mandiant:feature/script-analysisfrom
saniyafatima07:protobuf

Conversation

@saniyafatima07

@saniyafatima07 saniyafatima07 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

closes #3146

Checklist

  • No CHANGELOG update needed
  • Tests added
  • No documentation update needed
  • This submission includes AI-generated code and I have provided details in the description.
    The unit test was assisted by Chatgpt. All code was reviewed, modified and tested manually before submission.

@saniyafatima07 saniyafatima07 changed the title Protobuf Fix: Protobuf output Aug 12, 2026
@saniyafatima07

Copy link
Copy Markdown
Collaborator Author

@mike-hunhoff Could you please review it?

Comment thread capa/render/proto/__init__.py

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.

A lot of code has been removed from this file. I'm not familiar with capa's protobuf support. @williballenthin @mr-tz are there specifc commands that @saniyafatima07 must use to generate these stub files? Or do these changes look correct?

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.

these should be auto-generated (and the header kept?!)
how did you generate these @saniyafatima07?

the changes to the .proto above look reasonable

do we have documentation on this?

@saniyafatima07 saniyafatima07 Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@mr-tz I generated it using this command:

protoc --python_out=. --pyi_out=. capa/render/proto/capa.proto

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

do we have documentation on this?
Currently, we don’t have documentation for the protobuf output. I’ll add it once the issue is fixed.

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.

the header says:

@generated by mypy-protobuf. Do not edit manually! isort:skip_file

@williballenthin can you chime in here?

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 is probably a matter of which version of protoc is used. hopefully we have it documented somewhere.

in theory, it doesn't really matter which (compatible) version is used, but of course its nice when our diffs are nice and tight.

let me poke around and see what i can figure out.

mike-hunhoff and others added 3 commits August 13, 2026 19:07
Adds static analysis for script files (C#, Python, ASPX, HTML embedded scripts)
using Tree-Sitter feature extractors.

Revives and completes work originally introduced in mandiant#1080.

Co-authored-by: Edoardo Allegrini <allegrini.1969146@studenti.uniroma1.it>
Co-authored-by: Adam Storek <adamstorek@users.noreply.github.com>
@mike-hunhoff
mike-hunhoff force-pushed the feature/script-analysis branch from d70db63 to 091b508 Compare August 13, 2026 19:08
Adds static analysis for script files (C#, Python, ASPX, HTML embedded scripts)
using Tree-Sitter feature extractors.

Revives and completes work originally introduced in mandiant#1080.
@mike-hunhoff
mike-hunhoff force-pushed the feature/script-analysis branch 3 times, most recently from 10165af to bffd0f3 Compare August 18, 2026 14:52
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