Skip to content

Require SPDX copyright tags in source headers - #521

Open
jmccaffrey-nv wants to merge 2 commits into
NVIDIA:mainfrom
jmccaffrey-nv:codex/copyright-header-audit
Open

Require SPDX copyright tags in source headers#521
jmccaffrey-nv wants to merge 2 commits into
NVIDIA:mainfrom
jmccaffrey-nv:codex/copyright-header-audit

Conversation

@jmccaffrey-nv

Copy link
Copy Markdown
Collaborator

Summary

  • require non-empty SPDX copyright and license tags in first-party source headers
  • allow contributor-specific and multiple copyright notices
  • standardize contributor and agent guidance on the concise two-line SPDX form

Validation

  • executed the extracted CI header-check script across tracked source files
  • verified NVIDIA, individual contributor, and contributor-group notices pass
  • verified empty and whitespace-only copyright values fail
  • parsed the workflow YAML and ran git diff --check

@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@jmccaffrey-nv
jmccaffrey-nv force-pushed the codex/copyright-header-audit branch from ec4bccc to 18f27e2 Compare August 26, 2026 00:52
@jmccaffrey-nv

Copy link
Copy Markdown
Collaborator Author

/ready to test 18f27e2

@jmccaffrey-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test 18f27e2

@jmccaffrey-nv
jmccaffrey-nv marked this pull request as ready for review August 26, 2026 14:44
@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR strengthens source-header validation by requiring non-empty copyright and license tags and aligns contributor and agent documentation with the concise two-line SPDX form. The attempted string/docstring exclusion remains incomplete because bare * lines are accepted across all source languages.

  • Separates missing-copyright and missing-license diagnostics.
  • Documents contributor-specific and multiple copyright notices.
  • Standardizes SPDX guidance across contributor and agent documentation.

Confidence Score: 4/5

The PR should not merge until the header matcher prevents bare * text in non-C source strings or docstrings from satisfying the SPDX policy.

The attempted fix still applies a bare-* alternative to Python, shell, Dockerfile, and C-family files alike, so headerless non-C source can pass when SPDX-like lines occur inside a string or docstring.

Files Needing Attention: .github/workflows/reuse-lint.yml

Important Files Changed

Filename Overview
.github/workflows/reuse-lint.yml Adds non-empty, comment-anchored SPDX checks, but bare * matching still permits docstring or string text to pass for non-C languages.
CONTRIBUTING.md Replaces the long boilerplate example with concise SPDX guidance supporting actual copyright holders and multiple notices.
skills/maintaining-oss-state/SKILL.md Aligns OSS maintenance guidance with the new two-tag workflow policy.
skills/python-docstring-style/SKILL.md Updates Python header guidance to the concise two-line SPDX form and clarifies contributor attribution.

Reviews (3): Last reviewed commit: "Anchor SPDX checks to comment headers" | Re-trigger Greptile

Comment thread .github/workflows/reuse-lint.yml Outdated
Signed-off-by: Jonathan McCaffrey <jmccaffrey@nvidia.com>
Signed-off-by: Jonathan McCaffrey <jmccaffrey@nvidia.com>
@jmccaffrey-nv
jmccaffrey-nv force-pushed the codex/copyright-header-audit branch from 66c4b3d to cdc6b61 Compare August 26, 2026 23:50
@jmccaffrey-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test cdc6b61

Comment on lines +103 to +104
copyright_pattern='^[[:space:]]*(#|//|/\*|\*)[[:space:]]*SPDX-FileCopyrightText:[[:space:]]*[^[:space:]]'
license_pattern='^[[:space:]]*(#|//|/\*|\*)[[:space:]]*SPDX-License-Identifier:[[:space:]]*[^[:space:]]'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Bare stars bypass headers

When a Python, shell, or Dockerfile string or docstring contains * SPDX-FileCopyrightText: and * SPDX-License-Identifier: lines within its first 20 lines, the shared patterns treat them as source comments, causing a file without an actual SPDX comment header to pass the workflow.

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