comin: name its port as the security baseline sees it, fix pending
All checks were successful
nixos / nixos (push) Successful in 20s

The process listening on 4243 is .comin-wrapped, so the baseline flagged
it as unknown. After a restart comin reports an empty status until the
next commit arrives; count the head as pending only when it differs from
both the evaluated and the deployed commit.

Assisted-by: Claude:opus-5-5
This commit is contained in:
Sergei Poljanski 2026-11-17 11:56:25 +04:00
commit dd816bc219
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -53,7 +53,7 @@ in
"comin_main_signed \(if ($r.selected_commit_should_be_signed | not) or $r.selected_commit_signed then 1 else 0 end)",
"# HELP comin_main_pending Head of main differs from the last evaluated commit.",
"# TYPE comin_main_pending gauge",
"comin_main_pending \(if $head == .builder.generation.selected_commit_id then 0 else 1 end)"
"comin_main_pending \(if ($head // "") == "" or $head == .builder.generation.selected_commit_id or $head == .deployer.deployment.generation.selected_commit_id then 0 else 1 end)"
' > ${textfile}/comin.prom.tmp
mv ${textfile}/comin.prom.tmp ${textfile}/comin.prom
'';
@ -63,5 +63,5 @@ in
timerConfig.OnCalendar = "*:0/2";
};
asxpio.security.ports = [ "tcp/4243/comin" ];
asxpio.security.ports = [ "tcp/4243/.comin-wrapped" ];
}