File tree Expand file tree Collapse file tree
controllers/container_image/runtime_cache Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22name : Spell Checking
33
44on :
5- pull_request_target :
5+ pull_request :
66 types : [opened, reopened, synchronize]
77
88jobs :
99 spelling :
1010 name : Run spell check
1111 permissions :
1212 contents : read
13- pull-requests : read
14- actions : read
15- outputs :
16- followup : ${{ steps.spelling.outputs.followup }}
1713 runs-on : ubuntu-latest
18- if : " contains(github.event_name, 'pull_request') || github.event_name == 'push'"
1914 concurrency :
2015 group : spelling-${{ github.event.pull_request.number || github.ref }}
2116 # note: If you use only_check_changed_files, you do not want cancel-in-progress
4035 cspell:software-terms/src/software-tools.txt
4136 cspell:companies/src/companies.txt
4237 mondoo:mondoo_dictionary.txt
43-
44- comment :
45- name : Report
46- runs-on : ubuntu-latest
47- needs : spelling
48- permissions :
49- actions : read
50- contents : read
51- pull-requests : write
52- if : (success() || failure()) && needs.spelling.outputs.followup
53- steps :
54- - name : comment
55- uses : check-spelling/check-spelling@cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c # v0.0.26
56- env :
57- INPUT_IGNORE_SECURITY_ADVISORY : Sorry. https://github.com/jsoref/2026-06-16-credential-leak/blob/main/README.md
58- with :
59- checkout : true
60- ignore_security_advisory : Sorry. https://github.com/jsoref/2026-06-16-credential-leak/blob/main/README.md
61- task : ${{ needs.spelling.outputs.followup }}
Original file line number Diff line number Diff line change @@ -442,6 +442,9 @@ func Validate(cache v1alpha2.RuntimeCacheScanner) error {
442442 if ! strings .HasPrefix (delegate .HostPath , "/" ) {
443443 return fmt .Errorf ("containers.runtimeCache.delegates[%s].hostPath must be absolute" , delegate .Name )
444444 }
445+ if delegate .ReadOnly != nil && ! * delegate .ReadOnly {
446+ return fmt .Errorf ("containers.runtimeCache.delegates[%s].readOnly must be true" , delegate .Name )
447+ }
445448 }
446449 return nil
447450}
Original file line number Diff line number Diff line change @@ -60,6 +60,10 @@ func TestValidateRuntimeCache(t *testing.T) {
6060 cfg .Delegates [0 ].HostPath = "relative.sock"
6161 assert .ErrorContains (t , Validate (cfg ), "hostPath must be absolute" )
6262
63+ cfg = runtimeCacheAuditConfig ().Spec .Containers .RuntimeCache
64+ cfg .Delegates [0 ].ReadOnly = ptr .To (false )
65+ assert .ErrorContains (t , Validate (cfg ), "readOnly must be true" )
66+
6367 cfg = runtimeCacheAuditConfig ().Spec .Containers .RuntimeCache
6468 cfg .Delegates [0 ].Name = strings .Repeat ("a" , 64 )
6569 assert .ErrorContains (t , Validate (cfg ), "must be a valid DNS label" )
You can’t perform that action at this time.
0 commit comments