Skip to content

ci: mixed hardening: install incus-base only, validate @refs, save base/builder on fail, detect RUNNER_DEBUG - #33

Open
j4n wants to merge 4 commits into
mainfrom
j4n/incus-container-hardening
Open

ci: mixed hardening: install incus-base only, validate @refs, save base/builder on fail, detect RUNNER_DEBUG#33
j4n wants to merge 4 commits into
mainfrom
j4n/incus-container-hardening

Conversation

@j4n

@j4n j4n commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Working on #16, a few improvements came up that are bundled in this PR separately:

  • Do not install the full incus package, incus-base is enough, the full Incus package pulls qemu and all sorts of drivers taking quite a bit of CI time.
  • Validate @refs so only the input which ends up in the git-fetch bash call is safe in the shared workflow
  • Save the incus base/builder image cache even when the job fails
  • Detect RUNNER_DEBUG for verbose output

Moved out since the last review: the Incus bridge subnet IP filter, the check_init() extraction and the extra_config parameter are all related to #37.

@j4n j4n self-assigned this Aug 3, 2026
@j4n j4n closed this Aug 3, 2026
@j4n j4n reopened this Aug 3, 2026
@j4n
j4n force-pushed the j4n/incus-container-hardening branch from 6e58c52 to 0f9dd1c Compare August 5, 2026 10:32
@j4n
j4n force-pushed the j4n/madmail-main branch 2 times, most recently from 21ce0a0 to 6c9a088 Compare August 5, 2026 11:43
@j4n
j4n force-pushed the j4n/incus-container-hardening branch from 0f9dd1c to 74ab76e Compare August 5, 2026 11:43
@j4n
j4n force-pushed the j4n/madmail-main branch from 6c9a088 to d1f42b0 Compare August 5, 2026 11:57
@j4n
j4n force-pushed the j4n/incus-container-hardening branch from 74ab76e to d7cb3cf Compare August 5, 2026 11:57
@j4n j4n changed the title Incus container refactor for robustness / sharing chore: Incus container refactor for robustness / sharing Aug 5, 2026
@j4n
j4n force-pushed the j4n/madmail-main branch from d1f42b0 to 38649de Compare August 6, 2026 06:07
@j4n
j4n force-pushed the j4n/incus-container-hardening branch 2 times, most recently from b54535a to a2eb39e Compare August 6, 2026 11:23
@j4n
j4n force-pushed the j4n/madmail-main branch from 38649de to 3491696 Compare August 6, 2026 11:23
@j4n
j4n force-pushed the j4n/incus-container-hardening branch from a2eb39e to 2604f7d Compare August 6, 2026 11:35
@j4n
j4n force-pushed the j4n/madmail-main branch 2 times, most recently from 17fa180 to aa1e17d Compare August 11, 2026 10:39
@j4n
j4n force-pushed the j4n/incus-container-hardening branch from 2604f7d to 9ed3326 Compare August 11, 2026 10:39
@hpk42
hpk42 force-pushed the j4n/madmail-main branch from aa1e17d to a726488 Compare August 11, 2026 12:36
@hpk42
hpk42 force-pushed the j4n/incus-container-hardening branch from 9ed3326 to 11c8d1a Compare August 11, 2026 12:36
@hpk42
hpk42 force-pushed the j4n/madmail-main branch from a726488 to 02a4d4d Compare August 11, 2026 12:53
@hpk42
hpk42 force-pushed the j4n/incus-container-hardening branch from 11c8d1a to d2759fe Compare August 11, 2026 12:53
@j4n
j4n force-pushed the j4n/incus-container-hardening branch from d2759fe to 118563f Compare August 12, 2026 07:04
@j4n
j4n force-pushed the j4n/madmail-main branch 2 times, most recently from 0f158e5 to 4f8695d Compare August 13, 2026 13:41
@j4n
j4n force-pushed the j4n/incus-container-hardening branch from 118563f to 41ca883 Compare August 13, 2026 14:10
@j4n j4n changed the title chore: Incus container refactor for robustness / sharing chore: Incus container, CLI and CI hardening for shared runners Aug 13, 2026
@j4n j4n changed the title chore: Incus container, CLI and CI hardening for shared runners chore: Harden lxc-test workflow independent of drivers Aug 13, 2026
j4n added 2 commits August 13, 2026 17:23
actions/cache only saves on job success; after a failed job, the next attempt
rebuilds base and builder. Split into restore/save, count exported images and
save them.
Do not install the full incus package, incus-base is enough, the full Incus package pulls qemu and all sorts of drivers taking quite a bit of CI time.
j4n added 2 commits August 13, 2026 17:40
Every @ref ends up in `bash -ec` inside `git fetch/checkout` on the builder.
Route all three remote SourceSpec construction sites through _remote_spec(),
which makes it safe and surfaces typos cleanly as ValueError.
@j4n j4n changed the title chore: Harden lxc-test workflow independent of drivers ci: incus base only, validate @refs, save base/builder on fail, detect RUNNER_DEBUG Aug 13, 2026
@j4n
j4n force-pushed the j4n/incus-container-hardening branch from 41ca883 to ea8d2c2 Compare August 13, 2026 15:46
@j4n
j4n changed the base branch from j4n/madmail-main to main August 13, 2026 15:46
@j4n j4n changed the title ci: incus base only, validate @refs, save base/builder on fail, detect RUNNER_DEBUG ci: install incus-base only, validate @refs, save base/builder on fail, detect RUNNER_DEBUG Aug 13, 2026
@j4n j4n changed the title ci: install incus-base only, validate @refs, save base/builder on fail, detect RUNNER_DEBUG ci: mixed hardening: install incus-base only, validate @refs, save base/builder on fail, detect RUNNER_DEBUG Aug 20, 2026
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.

1 participant