Skip to content

[StepSecurity] Apply security best practices - #463

Open
iav wants to merge 1 commit into
armbian:mainfrom
step-security-bot:chore/GHA-150011-stepsecurity-remediation
Open

iav wants to merge 1 commit into
armbian:mainfrom
step-security-bot:chore/GHA-150011-stepsecurity-remediation

Conversation

@iav

@iav iav commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request is created by StepSecurity at the request of @iav. Please merge the Pull Request to incorporate the requested changes. Please tag @iav on your message if you have any questions related to the PR.

Security Fixes

Least Privileged GitHub Actions Token Permissions

The GITHUB_TOKEN is an automatically generated secret to make authenticated calls to the GitHub API. GitHub recommends setting minimum token permissions for the GITHUB_TOKEN.

Pinned Dependencies

GitHub Action tags and Docker tags are mutable. This poses a security risk. GitHub's Security Hardening guide recommends pinning actions to full length commit.

Harden Runner

Harden-Runner is an open-source security agent for the GitHub-hosted runner to prevent software supply chain attacks. It prevents exfiltration of credentials, detects tampering of source code during build, and enables running jobs without sudo access. See how popular open-source projects use Harden-Runner here.

Harden runner usage

You can find link to view insights and policy recommendation in the build log

Please refer to documentation to find more details.

Add OpenSSF Scorecard Workflow

OpenSSF Scorecard is an automated tool that assesses a number of important heuristics ("checks") associated with software security and assigns each check a score of 0-10. You can use these scores to understand specific areas to improve in order to strengthen the security posture of your project.

Scorecard workflow also allows maintainers to display a Scorecard badge on their repository to show off their hard work.

Feedback

For bug reports, feature requests, and general feedback; please email support@stepsecurity.io. To create such PRs, please visit https://app.stepsecurity.io/securerepo.

Signed-off-by: StepSecurity Bot bot@stepsecurity.io

Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
igorpecovnik added a commit that referenced this pull request Sep 20, 2026
DO NOT MERGE before armbian/armbian.github.io#463.

These floors exist to stop the aptly mirror fetching an upstream's whole
back catalogue. #463 makes the mirror filter pin each package to the exact
newest version in the index, which bounds the download far more tightly
than any floor, so the floors become dead weight.

Checked against the live index of every affected source, replicating
pin_newest()'s logic (entries > names, names <= 500):

  code             358 versions /   3 names   pin engages
  edge             761 versions /   4 names   pin engages
  zulu            2884 versions / 276 names   pin engages
  firefox          305 versions / 289 names   pin engages
  thunderbird      305 versions / 289 names   pin engages
  google-chrome      5 versions /   5 names   declines
  urbackup           1 version  /   1 name    declines
  zoom               1 version  /   1 name    declines

The three that decline do so because the index already holds one version
per name -- nothing to pin, and nothing for a floor to exclude either. So
the floor is redundant in every case.

A floor is also a static bound on a growing set: "code >= 1.107.0" admits
53 of today's 358 versions and will admit more every month, which is why
edge (>= 142.0.3595.94-1) and firefox (>= 146.0) have already drifted well
behind. The pin admits exactly one, permanently.

Kept deliberately:

  - Every "Name (% ...)" clause. The -filter-with-deps guard is
    [[ $GLOB != *Name* && $GLOB != *Version* ]], so a GLOB stripped to
    nothing flips the mirror into dependency-closure mode, which is much
    larger than what was removed.
  - zulu's "$Version (< 22.0)". That is an upper bound meaning "stay on
    Zulu 21", not a size limiter. Only the >= floor is dropped.

fastfetch.conf is METHOD=gh, where GLOB is never read -- its floor was
already inert. Changed anyway so the remaining configs are uniform.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
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.

2 participants