Skip to content

Add SPDX license header checker and missing headers - #1470

Open
shreyah963 wants to merge 2 commits into
opensearch-project:mainfrom
shreyah963:add-spdx-license-header-checker
Open

Add SPDX license header checker and missing headers#1470
shreyah963 wants to merge 2 commits into
opensearch-project:mainfrom
shreyah963:add-spdx-license-header-checker

Conversation

@shreyah963

@shreyah963 shreyah963 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Add SPDX license header validation to PR/push workflows using @kt3k/license-checker.

Changes:

  • Add .github/workflows/license-header-checker.yml
  • Add .licenserc.json
  • Add missing SPDX-License-Identifier: Apache-2.0 headers to source files

Related Issues

#6445

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: shreyah963 <shreyab963@gmail.com>
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

PR Code Analyzer ❗

AI-powered 'Code-Diff-Analyzer' found issues on commit e203a91.

Hard block: Issues at High severity or above will block this PR from merging.

PathLineSeverityDescription
.github/workflows/license-header-checker.yml11highNew npm package dependency introduced via npx in CI pipeline: @kt3k/license-checker@3.2.2. Per mandatory supply chain rule, all new package dependencies must be flagged regardless of apparent legitimacy. This package executes with full CI runner privileges and can exfiltrate secrets or modify source files.
.github/workflows/license-header-checker.yml10highThe actions/checkout action is pinned to commit hash de0fac2e4500dabe0009e67214ff5f5447ce83dd with a comment claiming '# v6', but actions/checkout v6 does not exist (latest is v4). A mismatch between the pinned hash and the version comment is a known supply chain attack pattern where a malicious commit hash is disguised with a plausible-looking version label. Maintainers must verify this hash resolves to the intended, trusted release.

The table above displays the top 10 most important findings.

Total: 2 | Critical: 0 | High: 2 | Medium: 0 | Low: 0


Pull Requests Author(s): Please update your Pull Request according to the report above.

Repository Maintainer(s): You can bypass diff analyzer by adding label skip-diff-analyzer after reviewing the changes carefully, then re-run failed actions. To re-enable the analyzer, remove the label, then re-run all actions.


⚠️ Note: The Code-Diff-Analyzer helps protect against potentially harmful code patterns. Please ensure you have thoroughly reviewed the changes beforehand.

Thanks.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.53%. Comparing base (a8c55b9) to head (e203a91).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1470      +/-   ##
============================================
- Coverage     78.58%   78.53%   -0.05%     
  Complexity     1315     1315              
============================================
  Files           106      106              
  Lines          6046     6046              
  Branches        647      647              
============================================
- Hits           4751     4748       -3     
- Misses         1004     1008       +4     
+ Partials        291      290       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: shreyah963 <shreyab963@gmail.com>
@dbwiddis dbwiddis added skip-changelog skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis. labels Aug 29, 2026
@shreyah963
shreyah963 marked this pull request as ready for review September 8, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants