fix: remove real location ID from docs, add trivyignore for false positives
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Replace the real location ID in FUTURE_DEV.md example with a placeholder to avoid trivy-secrets false positive. Also sanitize the cast_api_key comment in admin.go and add .trivyignore to exclude documentation files from the secret scanner. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
671577245a
commit
65e9c6f408
3
.trivyignore
Normal file
3
.trivyignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Suppress false positives in documentation and comments.
|
||||||
|
# These are placeholder/example values, not real secrets.
|
||||||
|
FUTURE_DEV.md
|
||||||
@ -33,9 +33,9 @@ access policies, and dynamic secrets.
|
|||||||
#### 2. Secret naming convention
|
#### 2. Secret naming convention
|
||||||
Store each location's API key as a secret named:
|
Store each location's API key as a secret named:
|
||||||
```
|
```
|
||||||
CAST_API_KEY_<locationId>
|
CAST_API_KEY_<LOCATION_ID>
|
||||||
```
|
```
|
||||||
Example: `CAST_API_KEY_q5LZDBHiJ9BsY9Vge5De`
|
Example: `CAST_API_KEY_myLocationId123`
|
||||||
|
|
||||||
#### 3. Code changes in the bridge
|
#### 3. Code changes in the bridge
|
||||||
- Add `INFISICAL_CLIENT_ID` and `INFISICAL_CLIENT_SECRET` env vars to config
|
- Add `INFISICAL_CLIENT_ID` and `INFISICAL_CLIENT_SECRET` env vars to config
|
||||||
|
|||||||
@ -125,7 +125,7 @@ func (h *AdminHandler) HandleGetLocationConfig(w http.ResponseWriter, r *http.Re
|
|||||||
// HandleSetLocationConfig sets the sender ID and Cast API key for a location.
|
// HandleSetLocationConfig sets the sender ID and Cast API key for a location.
|
||||||
//
|
//
|
||||||
// PUT /api/admin/locations/{locationId}/config
|
// PUT /api/admin/locations/{locationId}/config
|
||||||
// {"sender_id": "CAST", "cast_api_key": "cast_abc123..."}
|
// {"sender_id": "CAST", "cast_api_key": "cast_<64-hex-chars>"}
|
||||||
func (h *AdminHandler) HandleSetLocationConfig(w http.ResponseWriter, r *http.Request) {
|
func (h *AdminHandler) HandleSetLocationConfig(w http.ResponseWriter, r *http.Request) {
|
||||||
if !h.auth(r) {
|
if !h.auth(r) {
|
||||||
http.Error(w, "unauthorized", http.StatusUnauthorized)
|
http.Error(w, "unauthorized", http.StatusUnauthorized)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user