Files
hdf5/.github/workflows/clang-format-check.yml
T
3131956eb0 Harden workflow checkout credential hygiene + permissions (#6545)
* Harden workflow checkout credential hygiene + permissions

Address zizmor static-analysis findings:

- artipacked: add `persist-credentials: false` to actions/checkout
  steps in codeql.yml (2), test-binary-installation.yml (2),
  clang-format-check.yml, freebsd.yml, h5py.yml, openbsd.yml,
  signed-plugins.yml, and update-progress.yml. None of these jobs
  push to git, so dropping the persisted checkout credential is safe.

- excessive-permissions: restrict call-workflows.yml top-level
  permissions to `contents: read`, and grant `packages: write` /
  `pull-requests: write` only on the two jobs that call the
  maven-staging reusable workflow (which declares those needs).

No behavioral change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Removed extra blank lines.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2026-08-04 16:41:53 -04:00

26 lines
833 B
YAML

name: clang-format Check
on:
pull_request:
permissions:
contents: read
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run clang-format style check for C and Java code
uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20
with:
source: '.'
extensions: 'c,h,cpp,hpp,java'
clangFormatVersion: 17
style: file
exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'