Skip to content

test: add fast-check for OpenSSF Scorecard Fuzzing check#231

Merged
rhuanbarreto merged 1 commit into
mainfrom
fix/scorecard-env
Apr 26, 2026
Merged

test: add fast-check for OpenSSF Scorecard Fuzzing check#231
rhuanbarreto merged 1 commit into
mainfrom
fix/scorecard-env

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Replace hand-rolled random generators in fuzz tests with fast-check, a property-based testing library that OpenSSF Scorecard recognizes as a JavaScript/TypeScript fuzzing framework
  • The Scorecard Fuzzing check scans .ts files for import ... from 'fast-check' — this addresses the 0/10 Fuzzing score
  • Test coverage is equivalent: parseFrontmatter, parseAdr, AdrFrontmatterSchema, DomainNameSchema, DomainPrefixSchema, and ProjectConfigSchema exercised with 500 runs each

Expected Scorecard Impact

Check Before After
Fuzzing 0/10 10/10

Test plan

  • bun run validate passes (690 tests, 22/22 ADR rules)
  • 22 fuzz tests pass with 5,930 assertions
  • After merge: re-run Scorecard and verify Fuzzing score improves

Replace hand-rolled random generators with fast-check, a
property-based testing library that the OpenSSF Scorecard
recognizes as a fuzzing framework for JavaScript/TypeScript.

The scorecard Fuzzing check scans .ts files for fast-check
imports — this addresses the 0/10 Fuzzing score.

Test coverage is equivalent: parseFrontmatter, parseAdr,
AdrFrontmatterSchema, DomainNameSchema, DomainPrefixSchema,
and ProjectConfigSchema are all exercised with 500 runs each
using fc.property() arbitraries.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 26, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: ab60138
Status: ✅  Deploy successful!
Preview URL: https://67ea06b7.archgate-cli.pages.dev
Branch Preview URL: https://fix-scorecard-env.archgate-cli.pages.dev

View logs

@rhuanbarreto rhuanbarreto merged commit df28062 into main Apr 26, 2026
10 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/scorecard-env branch April 26, 2026 18:03
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