• Joined on 2026-02-08
clawbot pushed to feature/api-token-auth at sneak/upaas 2026-02-19 22:54:11 +01:00
160b02b0b6 fix: set authenticated user on request context in bearer token auth
clawbot commented on pull request sneak/upaas#95 2026-02-19 22:50:07 +01:00
chore: code cleanup and best practices (closes #45)

Straightforward cleanup PR — adds nolint annotations for false-positive gosec findings and fixes struct field alignment. All the suppressions are justified (field names, not hardcoded secrets; trusted config URLs, not user input).

clawbot commented on pull request sneak/upaas#94 2026-02-19 22:50:06 +01:00
feat: add API token authentication (closes #87)

Solid API token auth implementation. SHA-256 hashing, proper CRUD, Bearer token middleware, good test coverage including revocation. Well done.

clawbot commented on pull request sneak/upaas#94 2026-02-19 22:50:06 +01:00
feat: add API token authentication (closes #87)

16 random bytes = 128 bits of entropy. This is adequate but 32 bytes (256 bits) is more conventional for API tokens and provides more margin against future attacks. Low priority.

clawbot commented on pull request sneak/upaas#94 2026-02-19 22:50:06 +01:00
feat: add API token authentication (closes #87)

Potential bug: tryBearerAuth returns true on valid token but doesn't inject the authenticated user into the request context. Downstream handlers call h.auth.GetCurrentUser(ctx, request) which reads from the session — this will return nil for Bearer-only requests.

clawbot commented on pull request sneak/upaas#93 2026-02-19 22:50:05 +01:00
fix: clean up orphan resources on deploy cancellation (closes #89)

Good cleanup — cancelled deploys now properly remove orphan Docker images and build directories. The RemoveImage with Force: true and PruneChildren: true is correct for cleanup.

clawbot commented on pull request sneak/upaas#93 2026-02-19 22:50:05 +01:00
fix: clean up orphan resources on deploy cancellation (closes #89)

This duplicates the directory cleanup logic from the real cleanupCancelledDeploy. If the real implementation changes (e.g. different naming convention), this test helper won't catch the regression. Consider refactoring so the test exercises the actual code path.

clawbot commented on pull request sneak/upaas#93 2026-02-19 22:50:05 +01:00
fix: clean up orphan resources on deploy cancellation (closes #89)

Nit: entry.Name()[:len(prefix)] == prefix — prefer strings.HasPrefix(entry.Name(), prefix) for readability and safety (the length guard is easy to get wrong).

clawbot commented on pull request sneak/upaas#92 2026-02-19 22:50:04 +01:00
fix: restrict CORS to configured origins (closes #40)

Important security fix — replacing AllowedOrigins: ["*"] with explicit origin allowlist and enabling AllowCredentials: true. The old config was dangerous (wildcard + credentials is blocked by browsers, but the intent was wrong).

clawbot commented on pull request sneak/upaas#91 2026-02-19 22:50:03 +01:00
fix: validate repo URL format on app creation (closes #88)

Good security addition — blocking file:// URLs prevents local file access via git clone. Test coverage is thorough with both valid and invalid cases.

clawbot commented on pull request sneak/upaas#91 2026-02-19 22:50:03 +01:00
fix: validate repo URL format on app creation (closes #88)

The SCP regex accepts any user (not just git) and any path after :. Consider restricting the user portion or at minimum validating the path doesn't contain path traversal (..). Example concern: admin@localhost:../../etc/shadow.

clawbot commented on pull request sneak/dnswatcher#7 2026-02-19 22:50:02 +01:00
feat: implement TLS certificate inspector (closes #4)

Well-structured TLS checker with good use of the functional options pattern. Tests cover valid cert, connection refused, cancelled context, timeout, and SANs.

clawbot commented on pull request sneak/dnswatcher#7 2026-02-19 22:50:02 +01:00
feat: implement TLS certificate inspector (closes #4)

Only DNS SANs are captured (cert.DNSNames). IP SANs (cert.IPAddresses) and URI SANs are ignored. May be worth including depending on monitoring requirements.

clawbot commented on pull request sneak/dnswatcher#7 2026-02-19 22:50:02 +01:00
feat: implement TLS certificate inspector (closes #4)

Returning an empty CertificateInfo{} when len(state.PeerCertificates) == 0 could mask unexpected situations. Consider returning an error — a successful TLS handshake with zero peer certs is anomalous.

clawbot commented on pull request sneak/dnswatcher#6 2026-02-19 22:50:01 +01:00
feat: implement TCP port connectivity checker (closes #3)

Good implementation. Clean code, solid tests. A couple of observations:

clawbot commented on pull request sneak/dnswatcher#6 2026-02-19 22:50:01 +01:00
feat: implement TCP port connectivity checker (closes #3)

CheckPorts checks ports sequentially — for large port lists this could be slow (5s timeout × N ports worst case). Consider concurrent checks with errgroup if this will be used for port scanning scenarios.

clawbot commented on pull request sneak/dnswatcher#6 2026-02-19 22:50:01 +01:00
feat: implement TCP port connectivity checker (closes #3)

Minor: no validation that port is in valid range (1-65535). net.Dial will handle it, but an explicit early check would give a clearer error message.

clawbot created pull request sneak/dnswatcher#8 2026-02-19 22:49:06 +01:00
feat: implement watcher monitoring orchestrator (closes #2)
clawbot created branch feature/watcher-implementation in sneak/dnswatcher 2026-02-19 22:48:52 +01:00
clawbot pushed to feature/watcher-implementation at sneak/dnswatcher 2026-02-19 22:48:52 +01:00
f676cc9458 feat: implement watcher monitoring orchestrator
dea30028b1 test: add watcher orchestrator tests with mock dependencies
Compare 2 commits »