Skip to content

Chore/fmt tooling - #98

Open
HamzaAburaneh wants to merge 4 commits into
mainfrom
chore/fmt-tooling
Open

Chore/fmt tooling#98
HamzaAburaneh wants to merge 4 commits into
mainfrom
chore/fmt-tooling

Conversation

@HamzaAburaneh

Copy link
Copy Markdown
Contributor

add a make file and format files

Adds fmt, fmt-yml, and fmt-ips targets to the Makefile. fmt-yml uses
prettier with --ignore-path /dev/null to format all YMLs including
gitignored files. fmt-ips uses a Python script to reflow the nginx
ingress IP whitelist at 120 chars per line.
Fixes indentation and quote style in codeql.yml and docker-compose.yml.
@HamzaAburaneh
HamzaAburaneh requested a review from a team July 16, 2026 12:36
String url = request.getParameter("url");
String startDate = request.getParameter("startDate");
String endDate = request.getParameter("endDate");
Boolean error_keyword = "true".equals(request.getParameter("error_keyword"));
String url = request.getParameter("url");
String startDate = request.getParameter("startDate");
String endDate = request.getParameter("endDate");
Boolean error_keyword = "true".equals(request.getParameter("error_keyword"));
String theme = request.getParameter("theme");
String section = request.getParameter("section");
String url = request.getParameter("url");
Boolean error_keyword = "true".equals(request.getParameter("error_keyword"));
String url,
String department) {
var criteria = Criteria.where("processed").is("true");
var formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.csrf(csrf -> csrf.disable())
http.csrf(csrf -> csrf.disable())
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.csrf(csrf -> csrf.disable())
http.csrf(csrf -> csrf.disable())
Comment on lines +219 to +224
LOG.info(
"Created new badword entry: word={}, language={}, type={}, active={}",
normalizedWord,
language,
type,
active);
// Skip filter for health check endpoints (ALB health checks)
String requestPath = httpRequest.getRequestURI();
if ("/health".equals(requestPath) || "/actuator/health".equals(requestPath)) {
logger.debug("Skipping GC IP filter for health check endpoint: {}", requestPath);
String clientIp = getClientIpAddress(httpRequest);
logger.debug("Request from IP: {}", clientIp);
String clientIp = getClientIpAddress(httpRequest);
logger.debug("Request from IP: {}", clientIp);
return false;
}
try {
logger.debug("Checking if IP {} is owned by GC", ipAddress);
String response = restTemplate.getForObject(url, String.class);

if (response == null) {
logger.warn("Received null response from RDAP API for IP {}", ipAddress);

if (entities != null && entities.isArray()) {
boolean isGc = recursiveEntitySearch(entities);
logger.info("IP {} is {} owned by GC", ipAddress, isGc ? "" : "NOT");
return isGc;
}

logger.warn("No entities found in RDAP response for IP {}", ipAddress);
return false;

} catch (Exception e) {
logger.error("Error checking IP {} ownership: {}", ipAddress, e.getMessage());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants