Skip to content

Improve workflows security#546

Merged
llucax merged 10 commits intofrequenz-floss:v0.x.xfrom
llucax:security
Mar 25, 2026
Merged

Improve workflows security#546
llucax merged 10 commits intofrequenz-floss:v0.x.xfrom
llucax:security

Conversation

@llucax
Copy link
Copy Markdown
Contributor

@llucax llucax commented Mar 19, 2026

This PR improve the workflows security by:

  • Updating and pinning actions to SHA
  • Documenting why action permissions are necessary
  • Running Python in isolated mode
  • Avoiding potential shell injection
  • Removing discussions permission
  • Tightening permissions

@llucax llucax requested a review from a team as a code owner March 19, 2026 17:05
@llucax llucax requested review from simonvoelcker and removed request for a team March 19, 2026 17:05
@github-actions github-actions Bot added the part:template Affects the cookiecutter template files label Mar 19, 2026
@llucax llucax added type:tech-debt Improves the project without visible changes for users part:ci Affects the GitHub workflow and other parts for running CI and removed type:tech-debt Improves the project without visible changes for users labels Mar 19, 2026
@llucax llucax added this to the v0.17.0 milestone Mar 19, 2026
@llucax llucax enabled auto-merge March 19, 2026 17:10
llucax added 7 commits March 23, 2026 11:11
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Run Python in isolated mode (no adding . to PATH, etc.) to avoid any
potential code execution issues, even when in some places we are already
executing local code by design, it is better to have a safe default for
everything.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Avoid unsafe shell word splitting and glob expansion that could be used
for shell injection.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
We stopped creating a discussion per release a long time ago, so we
don't need the permission anymore.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Request only for the permissions we need to use. In particular,
explicitly request no permissions when none are needed, as the default
gives at least contents write permission.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Introduces the security improvements, but also some old improvements
that were not updated before.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
@llucax llucax dismissed matthias-wende-frequenz’s stale review March 23, 2026 10:11

The merge-base changed after approval.

@llucax
Copy link
Copy Markdown
Contributor Author

llucax commented Mar 23, 2026

Rebased, needs a new approval @matthias-wende-frequenz

llucax added 3 commits March 23, 2026 12:32
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
This is to improve resilience and security.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
@llucax llucax added this pull request to the merge queue Mar 25, 2026
Merged via the queue into frequenz-floss:v0.x.x with commit d9fa53d Mar 25, 2026
6 checks passed
@llucax llucax deleted the security branch March 25, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:ci Affects the GitHub workflow and other parts for running CI part:template Affects the cookiecutter template files type:tech-debt Improves the project without visible changes for users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants