-
Notifications
You must be signed in to change notification settings - Fork 10
Additional updates to S3 mode #43
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: v8
Are you sure you want to change the base?
Conversation
harmony7
commented
Nov 5, 2025
- Position S3 mode as BETA
- Make storage-mode default to kv-store
- When scaffolding S3 mode, add [setup] section for secret store to enable easy setup when deploying
- Add mechanism to "tag" cached objects so that they can be purged after publishing content
- Make sure that index and settings are purged after publishing content
- other minor bugfixes
| if (apiTokenResult == null) { | ||
| throw new Error("❌ Fastly API Token not provided.\nSet the FASTLY_API_TOKEN environment variable to an API token that has write access to the KV Store."); | ||
| } | ||
| console.log(`✔️ Fastly API Token: ${apiTokenResult.apiToken.slice(0, 4)}${'*'.repeat(apiTokenResult.apiToken.length - 4)} from '${apiTokenResult.source}'`); |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 days ago
To fix the issue, the log message on line 111 should be altered to exclude any part of the API token value. Instead, the log may note that a Fastly API token was loaded and, optionally, indicate the source from which it was loaded (e.g. environment variable, command line), but should not print the actual value or any portion thereof. Update the log statement to mask or remove the token, leaving only non-sensitive contextual information (e.g. "✔️ Fastly API Token loaded from 'env'").
The file to edit is src/cli/storage/s3-storage-provider.ts.
Only the log statement on line 111 is affected.
No new methods, imports, or definitions are required for this fix.
-
Copy modified line R111
| @@ -108,7 +108,7 @@ | ||
| if (apiTokenResult == null) { | ||
| throw new Error("❌ Fastly API Token not provided.\nSet the FASTLY_API_TOKEN environment variable to an API token that has write access to the KV Store."); | ||
| } | ||
| console.log(`✔️ Fastly API Token: ${apiTokenResult.apiToken.slice(0, 4)}${'*'.repeat(apiTokenResult.apiToken.length - 4)} from '${apiTokenResult.source}'`); | ||
| console.log(`✔️ Fastly API Token loaded from '${apiTokenResult.source}'`); | ||
| apiToken = apiTokenResult.apiToken; | ||
| } | ||
|
|