Priority: Medium
Description
In main.go:57:
server.Run(context.Background(), &mcp.StdioTransport{})
There is no signal handling. A SIGTERM during an scc or syft operation won't clean up temp files or close the syft source gracefully.
Suggested fix
Use signal.NotifyContext with SIGINT/SIGTERM:
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
if err := server.Run(ctx, &mcp.StdioTransport{}); err != nil {
log.Fatal(err)
}
Priority: Medium
Description
In
main.go:57:There is no signal handling. A
SIGTERMduring an scc or syft operation won't clean up temp files or close the syft source gracefully.Suggested fix
Use
signal.NotifyContextwithSIGINT/SIGTERM: