Skip to content

Harden actions#1784

Merged
Rob-Hague merged 2 commits intosshnet:developfrom
Rob-Hague:actions
Apr 12, 2026
Merged

Harden actions#1784
Rob-Hague merged 2 commits intosshnet:developfrom
Rob-Hague:actions

Conversation

@Rob-Hague
Copy link
Copy Markdown
Collaborator

@Rob-Hague Rob-Hague commented Apr 12, 2026

There is a lot of discussion about supply chain security and package compromise at the moment. This updates some of the yml in that respect:

  • Pin remaining actions
  • Specify top-level/default permissions: contents: read in build.yml
  • Set persist-credentials: false on checkout
  • Add an environment for nuget publish job and use release event trigger
  • Add dependabot cooldown

These recommendations were generated by https://github.com/zizmorcore/zizmor and AI review

- Pin remaining actions
- Specify top-level/default `permissions: contents: read` in build.yml
- Set `persist-credentials: false` on checkout
- Add an environment for nuget publish job and use `release` event trigger
- Add dependabot cooldown
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Hardens the repository’s GitHub Actions and Dependabot configuration to reduce supply-chain risk (action pinning, least-privilege tokens, and safer publish flows).

Changes:

  • Pin GitHub Actions to commit SHAs, update runners, and disable persist-credentials on checkout.
  • Add default permissions: contents: read in build.yml, and adjust triggers to include release publishing with an environment gate.
  • Add Dependabot cooldown windows to reduce update churn.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/docs.yml Pins actions, switches runner to Ubuntu 24.04, and disables persisted checkout credentials for docs deploy.
.github/workflows/build.yml Pins actions, applies top-level minimal permissions, disables persisted checkout credentials, and changes publish triggering to release-based with an environment.
.github/dependabot.yml Adds cooldown configuration to Dependabot update entries.
Comments suppressed due to low confidence (1)

.github/dependabot.yml:23

  • The ignore block no longer includes Microsoft.Bcl.AsyncInterfaces, but the PR description only mentions cooldowns/hardening and the inline comment says to see justifications in Directory.Packages.props. If this removal is unintended, re-add the ignore entry (or update the PR description/justification to explain why it’s no longer needed).
    ignore: # See justifications in Directory.Packages.props
      - dependency-name: "System.Formats.Asn1"
        update-types: ["version-update:semver-major"]
      
      - dependency-name: "Microsoft.Extensions.Logging.Abstractions"

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Rob-Hague Rob-Hague merged commit 04a6dc0 into sshnet:develop Apr 12, 2026
6 checks passed
@Rob-Hague Rob-Hague deleted the actions branch April 12, 2026 16:15
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.

3 participants