Skip to content

Add commit collection support to Apache Tomcat V2 importer#2195

Open
Dhirenderchoudhary wants to merge 3 commits intoaboutcode-org:mainfrom
Dhirenderchoudhary:feat/tomcat-commit-collection
Open

Add commit collection support to Apache Tomcat V2 importer#2195
Dhirenderchoudhary wants to merge 3 commits intoaboutcode-org:mainfrom
Dhirenderchoudhary:feat/tomcat-commit-collection

Conversation

@Dhirenderchoudhary
Copy link

@Dhirenderchoudhary Dhirenderchoudhary commented Mar 2, 2026

Date : 2 March 2026
Developer name : Dhirender Choudhary

Description

Add commit collection support to Apache Tomcat V2 importer.

  • Extract GitHub and GitBox commit URLs from security advisories
  • Add ReferenceV2 for all fix-related URLs

Related Issue

Closes #2129

Type of Change

  • New feature

Testing

  • Existing tests pass
  • New tests added - tests for commit URL extraction, GitBox support, and pipeline integration
  • Manually verified

Checklist

  • Self-reviewed the code
  • Follows existing importer patterns (v2 pipeline)
  • No new warnings or errors introduced

PIPELINE

  • Branch: feat/tomcat-commit-collection
  • Commit: d93a7c8
image

- Extract GitHub and GitBox commit URLs from security advisories
- Create PackageCommitPatchData for each commit hash
- Populate fixed_by_commit_patches on AffectedPackageV2
- Add ReferenceV2 for all fix-related URLs
- Add tests for commit URL extraction, GitBox support, and pipeline integration

Signed-off-by: Dhirenderchoudhary <dhirenderchoudhary0001@gmail.com>
Copy link
Collaborator

@ziadhany ziadhany left a comment

Choose a reason for hiding this comment

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

@Dhirenderchoudhary, I really appreciate your efforts.

Please see the comments there. Also, fix the CI, run the pipeline, and share the logs.

Comment on lines +359 to +371
def get_commit_patches(commit_urls):
commit_patches = []
for url in commit_urls:
match = GITHUB_COMMIT_URL_RE.match(url) or GITBOX_COMMIT_URL_RE.match(url)
if match:
commit_hash = match.group("commit_hash")
commit_patches.append(
PackageCommitPatchData(
vcs_url=TOMCAT_VCS_URL,
commit_hash=commit_hash,
)
)
return commit_patches
Copy link
Collaborator

Choose a reason for hiding this comment

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

use classify_patch_source or append_patch_classifications instead

see other importers like: v2_importers/aosp_importer.py

Copy link
Author

Choose a reason for hiding this comment

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

append_patch_classifications used in my changes

Signed-off-by: Dhirenderchoudhary <dhirenderchoudhary0001@gmail.com>
@Dhirenderchoudhary Dhirenderchoudhary force-pushed the feat/tomcat-commit-collection branch from 8118b64 to d93a7c8 Compare March 4, 2026 22:23
@Dhirenderchoudhary
Copy link
Author

@Dhirenderchoudhary, I really appreciate your efforts.

Please see the comments there. Also, fix the CI, run the pipeline, and share the logs.

It's my pleasure to work and fix some issues.
One request when i try to find issues most of the issues are already assigned to you or some other members , can. i get 2-3 issues to work as i don't want to work on issue someone is working as it is wastage of time for both.

let me know

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.

Add support in Apache Tomcat to collect commits

2 participants