Skip to content

Fix Scorecard supply-chain alerts: add fuzzing tests and CODEOWNERS - #12

Merged
VrilLabs merged 5 commits into
masterfrom
copilot/fix-code-scanning-alerts
Aug 15, 2026
Merged

Fix Scorecard supply-chain alerts: add fuzzing tests and CODEOWNERS#12
VrilLabs merged 5 commits into
masterfrom
copilot/fix-code-scanning-alerts

Conversation

Copilot AI commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Five OpenSSF Scorecard alerts were flagged in this repo. Three are false positives (process/time-based), two are addressable via code and config changes.

Changes

Alert #17 – Fuzzing (Medium) — Fixed

  • Added src/test/property.test.ts using fast-check for property-based testing, which Scorecard recognizes as a fuzzing integration for TypeScript/JavaScript projects
  • Tests cover invariants on all error classes (AlienSecError, AlienVaultAPIError, VirusTotalAPIError, DatabaseError, ConfigurationError) and EndpointFlavor validation logic
// Example: VirusTotalAPIError flag invariants
fc.assert(
  fc.property(fc.string(), fc.integer({ min: 100, max: 599 }), fc.boolean(), fc.boolean(),
    (message, statusCode, isRateLimit, isQuotaExceeded) => {
      const err = new VirusTotalAPIError(message, statusCode, isRateLimit, isQuotaExceeded);
      expect(err.isRateLimit).toBe(isRateLimit);
      expect(err.isRetryable).toBe(isRateLimit);
    })
);

Alert #1 – Branch-Protection (High) — Partially Fixed

  • Added .github/CODEOWNERS assigning @VrilLabs as required reviewer on all paths
  • Remaining settings (required reviewers count, status checks, force-push prevention) must be enabled in GitHub → Settings → Branches by a repo admin

False Positives (no code change possible)

Alert Reason
#18 Code-Review 0/24 historical commits reviewed — cannot retroactively add PR approvals
#19 Maintained Repo is < 90 days old; score improves automatically over time
#20 CII-Best-Practices Requires maintainer to register at bestpractices.dev

Copilot AI and others added 2 commits August 15, 2026 04:30
… alerts

Co-authored-by: VrilLabs <271641621+VrilLabs@users.noreply.github.com>
…back

Co-authored-by: VrilLabs <271641621+VrilLabs@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alerts flagged in repository Fix Scorecard supply-chain alerts: add fuzzing tests and CODEOWNERS Aug 15, 2026
Copilot AI requested a review from VrilLabs August 15, 2026 04:33
@VrilLabs
VrilLabs requested a lite review from Copilot August 15, 2026 04:44
@VrilLabs
VrilLabs marked this pull request as ready for review August 15, 2026 04:44

Copilot AI left a comment

Copy link
Copy Markdown

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 addresses OpenSSF Scorecard supply-chain alerts by adding a recognized fuzzing/property-based testing integration (fast-check) and introducing CODEOWNERS configuration to support branch-protection expectations.

Changes:

  • Added property-based tests with fast-check for core error classes and EndpointFlavor-related invariants.
  • Added fast-check as a dev dependency (with corresponding lockfile updates).
  • Added .github/CODEOWNERS to designate repository reviewers/owners for all paths.

Reviewed changes

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

File Description
src/test/property.test.ts Introduces fast-check property-based tests to satisfy Scorecard fuzzing signal and validate error-class invariants.
package.json Adds fast-check to devDependencies.
package-lock.json Locks fast-check (and transitive pure-rand) and records updated npm metadata.
.github/CODEOWNERS Defines code ownership for all paths to support branch protection / code-owner review flows.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/CODEOWNERS
Comment on lines +1 to +3
# CODEOWNERS
# These owners will be required reviewers for all pull requests.
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
Comment thread src/test/property.test.ts Outdated
Comment on lines +121 to +127
describe('EndpointFlavor – property-based tests', () => {
const VALID_FLAVORS = new Set(['pkg', 'powershell', 'apt', 'rpm']);

/** Mirrors the runtime validation logic used in tool handlers */
function isValidFlavor(value: string): boolean {
return VALID_FLAVORS.has(value);
}
Copilot AI and others added 2 commits August 15, 2026 04:50
Co-authored-by: VrilLabs <271641621+VrilLabs@users.noreply.github.com>
Co-authored-by: VrilLabs <271641621+VrilLabs@users.noreply.github.com>
@VrilLabs
VrilLabs merged commit 94ff069 into master Aug 15, 2026
5 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