Skip to content

Security: Improving OpenSSF Scorecard Rating for Enterprise Compliance (Targeting 7.0+) #1541

Description

@ecervantescelonis

Description

Hi Valibot team! First off, thank you for building such an incredible, tree-shakable validation library. The performance and tiny bundle footprint have been massive wins for the ecosystem.

Our organization is actively evaluating Valibot for a core project, but we operate under a strict internal compliance policy that requires any third-party dependencies to meet a minimum threshold score of 7.0 on the OpenSSF Scorecard audit.

Currently, Valibot's real-time scorecard registers at 5.2 / 10.

While Valibot already scores exceptionally well on critical metrics like Dangerous-Workflow (10/10), Binary-Artifacts (10/10), and CI-Tests (9/10), there are a few process-level configurations dragging down the aggregate score. Addressing these would help enterprise developers clear compliance hurdles smoothly.


Low-Hanging Fruit to Push the Score Past 7.0

According to the OpenSSF Scorecard CLI output, we can easily clear the 7.0 compliance bar by tightening a few configurations across the repository workflows:

1. Define Explicit Top-Level Token Permissions (Currently 0/10)

The scorecard is flagging that several workflows (such as .github/workflows/ci.yml and publish.yml) do not explicitly define restrictive top-level repository token permissions at the root.

  • Remediation: Declaring explicit read-only permissions at the absolute top of the workflow files securely drops ambient privileges:
    permissions:
      contents: read

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpriorityThis has priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions