-
-
Notifications
You must be signed in to change notification settings - Fork 228
Feature/maplibre frontend #1953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| .where(timestamp: start_at..end_at) | ||
|
|
||
| # Filter by geographic bounds if provided | ||
| if params[:min_longitude].present? && params[:max_longitude].present? && |
Check warning
Code scanning / CodeQL
Sensitive data read from GET request Medium
Route handler
| .where(timestamp: start_at..end_at) | ||
|
|
||
| # Filter by geographic bounds if provided | ||
| if params[:min_longitude].present? && params[:max_longitude].present? && |
Check warning
Code scanning / CodeQL
Sensitive data read from GET request Medium
Route handler
|
|
||
| # Filter by geographic bounds if provided | ||
| if params[:min_longitude].present? && params[:max_longitude].present? && | ||
| params[:min_latitude].present? && params[:max_latitude].present? |
Check warning
Code scanning / CodeQL
Sensitive data read from GET request Medium
Route handler
|
|
||
| # Filter by geographic bounds if provided | ||
| if params[:min_longitude].present? && params[:max_longitude].present? && | ||
| params[:min_latitude].present? && params[:max_latitude].present? |
Check warning
Code scanning / CodeQL
Sensitive data read from GET request Medium
Route handler
| # Filter by geographic bounds if provided | ||
| if params[:min_longitude].present? && params[:max_longitude].present? && | ||
| params[:min_latitude].present? && params[:max_latitude].present? | ||
| min_lng = params[:min_longitude].to_f |
Check warning
Code scanning / CodeQL
Sensitive data read from GET request Medium
Route handler
| if params[:min_longitude].present? && params[:max_longitude].present? && | ||
| params[:min_latitude].present? && params[:max_latitude].present? | ||
| min_lng = params[:min_longitude].to_f | ||
| max_lng = params[:max_longitude].to_f |
Check warning
Code scanning / CodeQL
Sensitive data read from GET request Medium
Route handler
| params[:min_latitude].present? && params[:max_latitude].present? | ||
| min_lng = params[:min_longitude].to_f | ||
| max_lng = params[:max_longitude].to_f | ||
| min_lat = params[:min_latitude].to_f |
Check warning
Code scanning / CodeQL
Sensitive data read from GET request Medium
Route handler
|
|
||
| const url = `${this.baseURL}/photos?${params}` | ||
| console.log('[ApiClient] Fetching photos from:', url) | ||
| console.log('[ApiClient] With headers:', this.getHeaders()) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
an access to apiKey
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 3 hours ago
To fix the issue, logging of sensitive values, specifically the API key inside the Authorization header, should be avoided. The log statement on line 127 outputs the full headers, including the API key. The best practice is to either remove the log entirely or, if logging is still needed for debugging, to obfuscate or omit the Authorization header when logging headers. The remainder of the code should remain unchanged, and no change to the actual HTTP request is required.
The required change is as follows:
- In
app/javascript/maps_maplibre/services/api_client.js, replace the sensitive logging on line 127 with a safer alternative. Either log only non-sensitive headers, or exclude/obfuscate the authorization header if debug logging is still desired. - No imports or additional dependencies are required.
-
Copy modified line R127
| @@ -124,7 +124,7 @@ | ||
|
|
||
| const url = `${this.baseURL}/photos?${params}` | ||
| console.log('[ApiClient] Fetching photos from:', url) | ||
| console.log('[ApiClient] With headers:', this.getHeaders()) | ||
| // Do not log sensitive Authorization headers | ||
|
|
||
| const response = await fetch(url, { | ||
| headers: this.getHeaders() |
No description provided.