Skip to content

feat: LICENSE-based allow rules — permit access to upstream repos by license type #220

@coopernetes

Description

@coopernetes

Problem

OSPO policy commonly permits contributing to any open-source project carrying an approved license (e.g. MIT, Apache-2.0, BSD variants). Today, operators must enumerate every allowed repo slug explicitly in URL rules. For environments with hundreds of upstream FOSS dependencies this is unmaintainable — and misses new repos added over time.

Proposed behaviour

Add a license-aware dimension to URL allow rules. When a rule specifies a `license` condition, the proxy fetches (and caches) the upstream repo's LICENSE file at allow-rule evaluation time and checks the detected SPDX identifier against the configured list or group.

rules:
  allow:
    - operations: [FETCH, PUSH]
      providers: [github]
      license:
        groups: [permissive]       # built-in group: MIT, Apache-2.0, BSD-*, ISC, …

Or with an explicit list:

    - operations: [FETCH]
      providers: [github]
      license:
        spdx: [MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause]

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions