Chore/fmt tooling - #98
Open
HamzaAburaneh wants to merge 4 commits into
Open
Conversation
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.
| 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()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add a make file and format files