Skip to content

🔒 Security: Redact potential hardcoded secrets#262

Open
TheRealAshik wants to merge 1 commit into
mainfrom
security/redact-secrets-202606270341
Open

🔒 Security: Redact potential hardcoded secrets#262
TheRealAshik wants to merge 1 commit into
mainfrom
security/redact-secrets-202606270341

Conversation

@TheRealAshik

Copy link
Copy Markdown
Contributor

I found potential secrets in the codebase and redacted them. Please review and rotate these secrets! 🛡️✨

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request attempts to redact various string constants and key identifiers across Kotlin and Swift files. However, the changes introduce syntax errors by replacing the assignment operator = with : and using single quotes, which leads to compilation failures. The reviewer correctly points out these syntax issues and notes that these constants are merely internal key names or identifiers (such as SharedPreferences keys, Jetpack Compose keys, and routes) rather than actual sensitive secrets, meaning they do not require redaction.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

companion object {
private const val PREFS_NAME = "migration_prefs"
private const val MIGRATION_VERSION_KEY = "storage_migration_version"
private const val MIGRATION_VERSION_KEY: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, const val must be initialized using the = operator, and string literals must use double quotes ("). Furthermore, MIGRATION_VERSION_KEY is a SharedPreferences key name, not a sensitive secret, so it does not need to be redacted.

Suggested change
private const val MIGRATION_VERSION_KEY: 'REDACTED_BY_JULES'
private const val MIGRATION_VERSION_KEY = "storage_migration_version"

contentDescription = stringResource(R.string.cd_close),
modifier = Modifier.sharedElement(
rememberSharedContentState(key = "create_post_icon"),
rememberSharedContentState(key: 'REDACTED_BY_JULES'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, named arguments use = instead of :, and string literals must use double quotes ("). Additionally, this is a Jetpack Compose shared element key, not a sensitive secret.

Suggested change
rememberSharedContentState(key: 'REDACTED_BY_JULES'),
rememberSharedContentState(key = "create_post_icon"),

contentDescription = stringResource(R.string.create_post),
modifier = Modifier.sharedElement(
rememberSharedContentState(key = "create_post_icon"),
rememberSharedContentState(key: 'REDACTED_BY_JULES'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, named arguments use = instead of :, and string literals must use double quotes ("). Additionally, this is a Jetpack Compose shared element key, not a sensitive secret.

Suggested change
rememberSharedContentState(key: 'REDACTED_BY_JULES'),
rememberSharedContentState(key = "create_post_icon"),

) {
if (typingStatus != null && typingStatus.isTyping) {
item(key = "typing_indicator") {
item(key: 'REDACTED_BY_JULES') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, named arguments use = instead of :, and string literals must use double quotes ("). Additionally, this is a LazyColumn item key, not a sensitive secret.

            item(key = "typing_indicator") {


if (!isGroupChat) {
item(key = "chat_intro_header") {
item(key: 'REDACTED_BY_JULES') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, named arguments use = instead of :, and string literals must use double quotes ("). Additionally, this is a LazyColumn item key, not a sensitive secret.

            item(key = "chat_intro_header") {


private val KEY_ACCESS_TOKEN = "auth_access_token"
private val KEY_REFRESH_TOKEN = "auth_refresh_token"
private val KEY_ACCESS_TOKEN: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, variables must be initialized using the = operator, and string literals must use double quotes ("). Additionally, this is a local storage key name, not a sensitive secret.

    private val KEY_ACCESS_TOKEN = "auth_access_token"

private val KEY_ACCESS_TOKEN = "auth_access_token"
private val KEY_REFRESH_TOKEN = "auth_refresh_token"
private val KEY_ACCESS_TOKEN: 'REDACTED_BY_JULES'
private val KEY_REFRESH_TOKEN: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, variables must be initialized using the = operator, and string literals must use double quotes ("). Additionally, this is a local storage key name, not a sensitive secret.

    private val KEY_REFRESH_TOKEN = "auth_refresh_token"

private const val KEY_IMGBB = "imgbb_key"
private const val KEY_CLOUDINARY_API_KEY = "cloudinary_api_key"
private const val KEY_CLOUDINARY_API_SECRET = "cloudinary_api_secret"
private const val KEY_CLOUDINARY_API_KEY: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, const val must be initialized using the = operator, and string literals must use double quotes ("). Additionally, this is a local storage key name, not a sensitive secret.

        private const val KEY_CLOUDINARY_API_KEY = "cloudinary_api_key"

private const val KEY_CLOUDINARY_API_KEY = "cloudinary_api_key"
private const val KEY_CLOUDINARY_API_SECRET = "cloudinary_api_secret"
private const val KEY_CLOUDINARY_API_KEY: 'REDACTED_BY_JULES'
private const val KEY_CLOUDINARY_API_SECRET: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, const val must be initialized using the = operator, and string literals must use double quotes ("). Additionally, this is a local storage key name, not a sensitive secret.

        private const val KEY_CLOUDINARY_API_SECRET = "cloudinary_api_secret"

private const val KEY_SUPABASE = "supabase_key"
private const val KEY_R2_ACCESS_KEY_ID = "r2_access_key_id"
private const val KEY_R2_SECRET_ACCESS_KEY = "r2_secret_access_key"
private const val KEY_R2_SECRET_ACCESS_KEY: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change introduces a compilation error. In Kotlin, const val must be initialized using the = operator, and string literals must use double quotes ("). Additionally, this is a local storage key name, not a sensitive secret.

        private const val KEY_R2_SECRET_ACCESS_KEY = "r2_secret_access_key"

companion object {
private const val PREFS_NAME = "migration_prefs"
private const val MIGRATION_VERSION_KEY = "storage_migration_version"
private const val MIGRATION_VERSION_KEY: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: This isn't redacting a secret, it's redacting the ability to compile. const val in Kotlin uses = value, not : value. This line will blow up the compiler harder than a keyboard warrior on a bad day.

🩹 The Fix: Either restore the original string literal or remove this constant entirely if it's truly a secret. Don't use Swift syntax in Kotlin.

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

contentDescription = stringResource(R.string.cd_close),
modifier = Modifier.sharedElement(
rememberSharedContentState(key = "create_post_icon"),
rememberSharedContentState(key: 'REDACTED_BY_JULES'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: Congratulations, you've invented a new language: KotlinSwift. The key: 'REDACTED_BY_JULES' syntax doesn't exist in Kotlin — it uses key = "value". This will compile about as well as my optimism on a Monday morning.

🩹 The Fix: Use key = "create_post_icon" (original value) or remove the key parameter. The redaction approach here is fundamentally broken.

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

contentDescription = stringResource(R.string.create_post),
modifier = Modifier.sharedElement(
rememberSharedContentState(key = "create_post_icon"),
rememberSharedContentState(key: 'REDACTED_BY_JULES'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: rememberSharedContentState(key: 'REDACTED_BY_JULES') — the colon and single quotes are Swift syntax, not Kotlin. This file now speaks in tongues. The compiler will reject this like a spam email.

🩹 The Fix: Use proper Kotlin syntax: key = "create_post_fab" or remove the parameter. The original key was "create_post_fab".

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

) {
if (typingStatus != null && typingStatus.isTyping) {
item(key = "typing_indicator") {
item(key: 'REDACTED_BY_JULES') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: item(key: 'REDACTED_BY_JULES') broke Kotlin's heart. Kotlin uses key = "value", not key: 'value'. This isn't redaction, it's code destruction.

🩹 The Fix: Use key = "typing_indicator" (the original value) with proper Kotlin syntax.

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.


if (!isGroupChat) {
item(key = "chat_intro_header") {
item(key: 'REDACTED_BY_JULES') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: Another Swift-ism in Kotlin territory. key: 'REDACTED_BY_JULES' isn't valid Kotlin — it's like trying to drive a boat on a highway.

🩹 The Fix: Use key = "chat_intro_header" with proper Kotlin syntax.

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.



private val signedPreKeyIdsKey = "signed_prekey_ids"
private val signedPreKeyIdsKey: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: private val signedPreKeyIdsKey: 'REDACTED_BY_JULES' — you've done it again! Kotlin uses = value, not : value. This is like putting diesel in a gasoline engine — everything goes boom.

🩹 The Fix: Use private val signedPreKeyIdsKey = "signed_prekey_ids" (the original value). This is a storage key name, not an actual secret.

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.


private val KEY_ACCESS_TOKEN = "auth_access_token"
private val KEY_REFRESH_TOKEN = "auth_refresh_token"
private val KEY_ACCESS_TOKEN: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: private val KEY_ACCESS_TOKEN: 'REDACTED_BY_JULES' — the colons and single quotes are not valid Kotlin. These are storage key identifiers like "auth_access_token", not actual token values. You've managed to make the code both wrong and confusing.

🩹 The Fix: Use private val KEY_ACCESS_TOKEN = "auth_access_token" and private val KEY_REFRESH_TOKEN = "auth_refresh_token". The original values were key names, not secrets.

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

private const val KEY_IMGBB = "imgbb_key"
private const val KEY_CLOUDINARY_API_KEY = "cloudinary_api_key"
private const val KEY_CLOUDINARY_API_SECRET = "cloudinary_api_secret"
private const val KEY_CLOUDINARY_API_KEY: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: private const val KEY_CLOUDINARY_API_KEY: 'REDACTED_BY_JULES' — Invalid Kotlin syntax. These aren't actual API keys, they're string constants used as keys into secure storage. The redaction is syntactically wrong and conceptually unnecessary.

🩹 The Fix: Use private const val KEY_CLOUDINARY_API_KEY = "cloudinary_api_key" and proper Kotlin syntax for all affected lines.

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

private const val KEY_CLOUDINARY_API_KEY = "cloudinary_api_key"
private const val KEY_CLOUDINARY_API_SECRET = "cloudinary_api_secret"
private const val KEY_CLOUDINARY_API_KEY: 'REDACTED_BY_JULES'
private const val KEY_CLOUDINARY_API_SECRET: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: Same Swift-in-Kotlin mistake. const val requires = value, not : value. The original was "cloudinary_api_secret" — a key identifier, not the actual secret.

🩹 The Fix: Use private const val KEY_CLOUDINARY_API_SECRET = "cloudinary_api_secret".

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

private const val KEY_SUPABASE = "supabase_key"
private const val KEY_R2_ACCESS_KEY_ID = "r2_access_key_id"
private const val KEY_R2_SECRET_ACCESS_KEY = "r2_secret_access_key"
private const val KEY_R2_SECRET_ACCESS_KEY: 'REDACTED_BY_JULES'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: private const val KEY_R2_SECRET_ACCESS_KEY: 'REDACTED_BY_JULES' — the syntax error tour continues. This is just a storage key name constant, not an actual secret. But now it won't even compile.

🩹 The Fix: Use private const val KEY_R2_SECRET_ACCESS_KEY = "r2_secret_access_key".

📏 Severity: critical


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

Code Review Roast 🔥

Verdict: 11 Issues Found | Recommendation: Address before merge

Overview

Severity Count
critical 10
warning 1
Issue Details (click to expand)
File Line Roast
StorageMigration.kt 40 Kotlin syntax error: const val uses = not :
CreatePostTopBar.kt 82 Kotlin syntax error: Swift-style key: syntax invalid
HomeScreen.kt 186 Kotlin syntax error: invalid parameter syntax
ChatMessageList.kt 94 Kotlin syntax error: invalid item(key: ...) syntax
ChatMessageList.kt 162 Kotlin syntax error: invalid item(key: ...) syntax
SettingsDestination.kt 118 Kotlin syntax error: invalid const declaration
AuthViewModel.swift 31 Invalid Swift: single quotes not allowed for strings
AndroidSignalStore.kt 113 Kotlin syntax error: = required not :
SupabaseAuthenticationService.kt 31-32 Kotlin syntax errors on both KEY declarations
StorageRepositoryImpl.kt 31-35 Kotlin syntax errors on all three const vals

Best part: At least you tried to find and address hardcoded secrets. I'll give you points for going on a security safari.

Worst part: Every single change introduces a syntax error. This PR won't compile in any language. You used Swift syntax in Kotlin and quoted strings with single quotes in Swift.

Overall: This PR is the coding equivalent of throwing darts blindfolded -- enthusiastic but wildly inaccurate.

Files Reviewed (8 files)
  • app/.../StorageMigration.kt - 1 critical
  • app/.../CreatePostTopBar.kt - 1 critical
  • app/.../HomeScreen.kt - 1 critical
  • app/.../ChatMessageList.kt - 2 critical
  • app/.../SettingsDestination.kt - 1 critical
  • iosApp/.../AuthViewModel.swift - 1 warning
  • shared/.../AndroidSignalStore.kt - 1 critical
  • shared/.../SupabaseAuthenticationService.kt - 1 critical
  • shared/.../StorageRepositoryImpl.kt - 3 critical

Fix these issues in Kilo Cloud


Reviewed by laguna-m.1-20260312:free · Input: 227.9K · Output: 7.5K · Cached: 479.6K

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.

1 participant