- Add RateLimitConfig for configuration management with YAML binding support. - Introduce RateLimitDecision to encapsulate the result of rate limit checks. - Implement RateLimitMetrics for OpenTelemetry metrics tracking. - Create RateLimitMiddleware for enforcing rate limits on incoming requests. - Develop RateLimitService to orchestrate instance and environment rate limit checks. - Add RateLimitServiceCollectionExtensions for dependency injection registration.
19 lines
448 B
C
19 lines
448 B
C
// gt-0001: Direct call to vulnerable sink from main
|
|
// Expected: REACHABLE (tier: executed)
|
|
// Vulnerability: CWE-120 (Buffer Copy without Checking Size)
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
char buffer[32];
|
|
|
|
if (argc > 1) {
|
|
// Vulnerable: strcpy without bounds checking
|
|
strcpy(buffer, argv[1]); // SINK: CWE-120
|
|
printf("Input: %s\n", buffer);
|
|
}
|
|
|
|
return 0;
|
|
}
|