Skip to content

Add SPDX license header checker and missing headers - #5725

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

shreyah963 wants to merge 5 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.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • 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.

@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 b00be95.

PathLineSeverityDescription
.github/workflows/license-header-checker.yml12highNew third-party GitHub Actions dependency added: `peterzhuamazon/license_checker_github_action@ee6c65336e5d72ac79a8358de0b7856c3b1c6bcb`. This action is from an individual user account (not a verified organization), and executes in CI with access to the repository and its secrets. Per mandatory supply chain rules, all new build plugin/action dependencies must be flagged regardless of apparent legitimacy. Maintainers should verify the commit hash corresponds to the expected v1.0.8 release and audit the action's code for unexpected behavior.

The table above displays the top 10 most important findings.

Total: 1 | Critical: 0 | High: 1 | 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 Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.19%. Comparing base (9249643) to head (b00be95).

❌ Your project check has failed because the head coverage (75.19%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5725   +/-   ##
=========================================
  Coverage     75.19%   75.19%           
  Complexity    10362    10362           
=========================================
  Files           962      962           
  Lines         41098    41098           
  Branches       4683     4683           
=========================================
  Hits          30905    30905           
  Misses         8896     8896           
  Partials       1297     1297           
Flag Coverage Δ
sql-engine 75.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Swiddis

Swiddis commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

We've had this for a while in our existing spotless configs, I think these files are old files from before the config was added. https://github.com/search?q=repo%3Aopensearch-project%2Fsql+licenseHeader&type=code

Would prefer to just use the existing config & fix all the old inherited files once. A separate CI check for this is redundant if it's a spotless rule.

@Swiddis Swiddis added the maintenance Improves code quality, but not the product label Oct 20, 2026
Signed-off-by: shreyah963 <shreyab963@gmail.com>
Signed-off-by: shreyah963 <shreyab963@gmail.com>
Signed-off-by: shreyah963 <shreyab963@gmail.com>
Signed-off-by: shreyah963 <shreyab963@gmail.com>
@shreyah963
shreyah963 force-pushed the add-spdx-license-header-checker branch from bffd3c9 to 5adee47 Compare October 22, 2026 21:22
Signed-off-by: shreyah963 <shreyab963@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improves code quality, but not the product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants