Skip to content

feat: use shared temporary directory for vanir signature generation#5234

Open
cuixq wants to merge 4 commits intogoogle:masterfrom
cuixq:vanir
Open

feat: use shared temporary directory for vanir signature generation#5234
cuixq wants to merge 4 commits intogoogle:masterfrom
cuixq:vanir

Conversation

@cuixq
Copy link
Copy Markdown
Contributor

@cuixq cuixq commented Apr 14, 2026

#4611

This PR updates the vanir_signatures worker to use a shared temporary directory for all Git-related operations during signature generation.

  • Shared Working Directory: tempfile.TemporaryDirectory is initialized and this path is passed down through process_batch to _generate_vanir_signatures_batch.
  • Vanir Configuration: Leverages code_extractor_base.ExtractorConfig to explicitly set git_working_dir, ensuring all signature generation threads share the same base directory.
  • Upgraded vanir from 1.0.2 to 1.1.0 to support the new ExtractorConfig and git_working_dir parameters.

By using a shared working directory, the same repository does not need to be re-cloned if it contains multiple vulnerabilities. We may integrate gitter in a later PR to handle cloning repositories to the shared temp directory to further optimize the code extraction.

@cuixq cuixq marked this pull request as ready for review April 15, 2026 00:49
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.

1 participant