Skip to content

Conversation

seanbudd
Copy link
Member

@seanbudd seanbudd commented Aug 15, 2025

Fixes #6341
Fixes #3808
Related: nvaccess/addon-datastore-validation#46

Issues:

  • Files are not normalized consistently with newlines Normalize json files in the views branch #6341
  • When an add-on is submitted codeQL scanning and VirusTotal scanning occurs. This will only report warnings on the issue submission, but the results are not stored anywhere. We want to be able to analyze all the scan results.
  • VirusTotal scan URLs are created not committed when add-ons are submitted. They are currently only committed by the action which scans all add-ons
  • When an add-on submission fails due to virus scanning, there's no clear way to manually approve it and resubmit it safely Superfluous comment when verifySubmitterjob fails #3808
  • CodeQL results are not recorded

Solutions:

Known issues

  • CodeQL results are not scanned in the retrospective batch scanning. This will be done in a future PR

Testing

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the add-on security scanning system to store scan results directly in add-on metadata files instead of using a separate reviewedAddons.json file. The changes improve result persistence and consistency while introducing manual approval requirements for security failures.

  • Store VirusTotal and CodeQL scan results directly in add-on metadata files
  • Remove the reviewedAddons.json tracking system in favor of metadata-based storage
  • Require manual approval through GitHub environments when security scans fail

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
reviewedAddons.json Removes the centralized tracking file for reviewed add-ons
.github/workflows/virusTotalAnalysis.js Refactors to store scan results in metadata and normalize newlines
.github/workflows/virusScanAllAddons.yml Updates batch processing and commit messages for new result storage
.github/workflows/securityAnalysis.js Modifies to store CodeQL results in metadata instead of reviewedAddons.json
.github/workflows/codeql-analysis.yml Adds result committing and removes manual approval artifacts
.github/workflows/checkAndSubmitAddonMetadata.yml Replaces manual approval PR creation with environment-based approval

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -24,7 +24,7 @@ jobs:
VT_API_KEY: ${{ secrets.VT_API_KEY }}
VT_API_LIMIT: ${{ vars.VT_API_LIMIT }}
BRANCH_NAME: addVTURLs${{ github.run_number }}
BATCH_SIZE: 100
BATCH_SIZE: 10
Copy link
Member Author

Choose a reason for hiding this comment

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

temporarily adjusted for testing, we can probably up this to 300 once testing is complete

@seanbudd seanbudd marked this pull request as draft August 15, 2025 04:50
seanbudd added a commit to nvaccess/addon-datastore-staging that referenced this pull request Aug 15, 2025
@seanbudd
Copy link
Member Author

seanbudd commented Aug 15, 2025

TODO:

  • When submitting an add-on, there are conflicts when trying to update the add-on metadata from each job. Instead, a separate job that depends on all the scanners, should take JSON output stored in variable from the scanners, and use those variables to commit to updating the add-on metadata in a single job.
  • update the script for scanning all add-ons to also scan with CodeQL: going to split out to a separate PR
  • split out python 3.13 changes

seanbudd added a commit to nvaccess/addon-datastore-validation that referenced this pull request Aug 15, 2025
Fix schema properties: vtScanUrl submissionTime reviewUrl

Add scan results schema property for nvaccess/addon-datastore#6411
@seanbudd seanbudd marked this pull request as ready for review August 22, 2025 02:47
Copy link
Member

@SaschaCowley SaschaCowley left a comment

Choose a reason for hiding this comment

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

Please also document the change in process

Copy link
Member

@SaschaCowley SaschaCowley left a comment

Choose a reason for hiding this comment

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

Thanks, @seanbudd

@SaschaCowley SaschaCowley merged commit 6383b97 into master Sep 5, 2025
@SaschaCowley SaschaCowley deleted the vtResults branch September 5, 2025 06:37
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.

Normalize json files in the views branch Superfluous comment when verifySubmitterjob fails
2 participants