ci(ql3): enable bridge netfilter for security live

This commit is contained in:
whyour
2026-08-25 10:01:13 +08:00
parent 9afcf9413c
commit a027c92f26
2 changed files with 14 additions and 0 deletions
@@ -744,6 +744,18 @@ async function main(argv = process.argv.slice(2)) {
const createdEvidenceJobs = new Set(); const createdEvidenceJobs = new Set();
try { try {
const nodes = await fixture.start(); const nodes = await fixture.start();
for (const node of fixture.nodes) {
for (const setting of [
'net.ipv4.ip_forward=1',
'net.bridge.bridge-nf-call-iptables=1',
]) {
const configured = fixture.dockerRun(
['exec', node, 'sysctl', '-w', setting],
{ capture: true, quiet: true },
).stdout;
assert.equal(configured.trim().endsWith(' = 1'), true);
}
}
const architecture = fixture.inspectImage(fixture.k3sImage).Architecture; const architecture = fixture.inspectImage(fixture.k3sImage).Architecture;
assert.ok(['amd64', 'arm64'].includes(architecture)); assert.ok(['amd64', 'arm64'].includes(architecture));
for (const reviewedImage of [OPERATOR_IMAGE, POSTGRES_IMAGE]) { for (const reviewedImage of [OPERATOR_IMAGE, POSTGRES_IMAGE]) {
@@ -178,6 +178,8 @@ test('live runner remains opt-in, reviewed, cleanup-bound and log-free', () => {
); );
assert.match(source, /reviewedOperatorManifest\(operatorManifestFile\)/); assert.match(source, /reviewedOperatorManifest\(operatorManifestFile\)/);
assert.match(source, /validateSecurityAdministrationKubernetesLiveReport/); assert.match(source, /validateSecurityAdministrationKubernetesLiveReport/);
assert.match(source, /net\.ipv4\.ip_forward=1/);
assert.match(source, /net\.bridge\.bridge-nf-call-iptables=1/);
assert.match(source, /projectedMode: 0o444/); assert.match(source, /projectedMode: 0o444/);
assert.match(source, /credential\.issue\.replay/); assert.match(source, /credential\.issue\.replay/);
assert.match(source, /FallbackToLogsOnError/); assert.match(source, /FallbackToLogsOnError/);