mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-16 18:05:31 +02:00
* feat(cso): add verified audits and replayable repair bundles * fix(cso): harden qualification and setup boundaries * fix(cso): assemble security canaries at runtime * fix(cso): bound release proof and maintenance work Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix(cso): require complete evaluation reports Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix(cso): replay expired snapshots from supplied source Co-Authored-By: OpenAI Codex <noreply@openai.com> * test(cso): synchronize DNS cancellation assertion Co-Authored-By: OpenAI Codex <noreply@openai.com> * chore(ship): exempt repository owner from liveness proof Co-Authored-By: OpenAI Codex <noreply@openai.com> * test(cso): make recheck retention overlap deterministic Co-Authored-By: OpenAI Codex <noreply@openai.com> * chore: bump version and changelog (v1.85.0.0) Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix(cso): pass native release gates Co-Authored-By: OpenAI Codex <noreply@openai.com> * chore: move release to v1.86.0.0 Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix(cso): resolve rechecks by finding Co-Authored-By: OpenAI Codex <noreply@openai.com> * chore: move release to v1.87.0.0 Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix(cso): pass macOS and Windows release gates Normalize BSD wc output, compare Windows paths by filesystem identity, preserve portable snapshot race coverage, and narrow POSIX-only Windows fixtures. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix(cso): harden native verification gates * fix(cso): refine Windows native diagnostics * test(cso): isolate Windows Git startup failure * test(cso): stabilize Windows native diagnostics * fix(cso): support hardened Git on Windows * fix(cso): close final verification gaps * test(cso): bound cold Docker fixture setup * fix(cso): restore cross-platform free-suite gates --------- Co-authored-by: OpenAI Codex <noreply@openai.com>
42 lines
1.7 KiB
C
42 lines
1.7 KiB
C
/* Trusted, dependency-free loopback service for runtime/verifier smoke tests.
|
|
* This is infrastructure evidence, not a vulnerable/fixed evaluation pair. */
|
|
#include <arpa/inet.h>
|
|
#include <signal.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <sys/socket.h>
|
|
#include <unistd.h>
|
|
|
|
int main(void) {
|
|
signal(SIGPIPE, SIG_IGN);
|
|
int server = socket(AF_INET, SOCK_STREAM, 0), reuse = 1;
|
|
struct sockaddr_in address = {.sin_family = AF_INET, .sin_port = htons(34568),
|
|
.sin_addr.s_addr = htonl(INADDR_LOOPBACK)};
|
|
if (server < 0 || setsockopt(server, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)) ||
|
|
bind(server, (void *)&address, sizeof(address)) || listen(server, 8)) return 2;
|
|
for (;;) {
|
|
int client = accept(server, NULL, NULL);
|
|
if (client < 0) continue;
|
|
char request[2048] = {0}, response[256];
|
|
ssize_t received = read(client, request, sizeof(request) - 1);
|
|
const char *status = "404 Not Found", *body = "MISSING";
|
|
if (received > 0 && strncmp(request, "GET /control ", 13) == 0) {
|
|
status = "200 OK"; body = "CONTROL_OK";
|
|
} else if (received > 0 && strncmp(request, "GET /security ", 14) == 0) {
|
|
status = "403 Forbidden"; body = "DENIED";
|
|
}
|
|
int length = snprintf(response, sizeof(response),
|
|
"HTTP/1.1 %s\r\nContent-Length: %zu\r\nConnection: close\r\n\r\n%s",
|
|
status, strlen(body), body);
|
|
if (length > 0 && (size_t)length < sizeof(response)) {
|
|
size_t sent = 0;
|
|
while (sent < (size_t)length) {
|
|
ssize_t count = write(client, response + sent, (size_t)length - sent);
|
|
if (count <= 0) break;
|
|
sent += (size_t)count;
|
|
}
|
|
}
|
|
close(client);
|
|
}
|
|
}
|