mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-22 10:32:40 +08:00
feat(ql3): prove security administration custody live
This commit is contained in:
@@ -48,6 +48,26 @@ test('rejects Kubernetes API token authority in the administration Job', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('rejects recursive fsGroup rewrites of persistent credential custody', () => {
|
||||
const report = auditSecurityAdministrationKubernetes({
|
||||
root: ROOT,
|
||||
readFile: intercept(
|
||||
'deploy/kubernetes/ql3-cluster/operations/security-administration/base/job.yaml',
|
||||
(value) => value.replace(
|
||||
'fsGroupChangePolicy: OnRootMismatch',
|
||||
'fsGroupChangePolicy: Always',
|
||||
),
|
||||
),
|
||||
});
|
||||
|
||||
assert.equal(report.compatible, false);
|
||||
assert.ok(
|
||||
report.findings.some(
|
||||
({ code }) => code === 'QL3_SECURITY_ADMIN_KUBERNETES_JOB_BOUNDARY_INVALID',
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test('rejects a non-persistent credential delivery boundary', () => {
|
||||
const report = auditSecurityAdministrationKubernetes({
|
||||
root: ROOT,
|
||||
|
||||
Reference in New Issue
Block a user