Skip to content

🔒 Security: Redact potential hardcoded secrets#255

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

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

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 introduces critical syntax errors across multiple Kotlin and Swift files by replacing string literals with invalid redaction placeholders (e.g., : 'REDACTED_BY_JULES'). This breaks compilation as both languages require proper assignment operators and double quotes for string literals. Furthermore, the redacted values are non-sensitive keys (such as database keys, SharedPreferences keys, and UI transition identifiers) rather than actual secrets. The feedback highlights these compilation issues and provides code suggestions to restore the original, valid code.

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 syntax error in Kotlin. A const val must be initialized using the assignment operator = and a valid string literal. Additionally, "storage_migration_version" is merely a SharedPreferences key name, not a sensitive secret, so redacting it is unnecessary and breaks functionality.

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 syntax error in Kotlin. Kotlin uses = for named arguments (not :), and single quotes are reserved for Char literals rather than String literals. Furthermore, "create_post_icon" is a transition key for Jetpack Compose Shared Element transitions, not a 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 syntax error in Kotlin. Kotlin uses = for named arguments (not :), and single quotes are reserved for Char literals rather than String literals. Furthermore, "create_post_icon" is a transition key for Jetpack Compose Shared Element transitions, not a 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 syntax error in Kotlin. Kotlin uses = for named arguments (not :), and single quotes are reserved for Char literals rather than String literals. Furthermore, "typing_indicator" is a LazyColumn item key, not a 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 syntax error in Kotlin. Kotlin uses = for named arguments (not :), and single quotes are reserved for Char literals rather than String literals. Furthermore, "chat_intro_header" is a LazyColumn item key, not a 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 syntax error in Kotlin. Kotlin requires = for assignment, and single quotes are invalid for strings. Additionally, "auth_access_token" is a key name used for secure storage, not an actual 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 syntax error in Kotlin. Kotlin requires = for assignment, and single quotes are invalid for strings. Additionally, "auth_refresh_token" is a key name used for secure storage, not an actual 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 syntax error in Kotlin. A const val must be initialized using the assignment operator = and a valid string literal. Additionally, this is a key used to store/retrieve configuration from database/secure storage, not an actual 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 syntax error in Kotlin. A const val must be initialized using the assignment operator = and a valid string literal. Additionally, this is a key used to store/retrieve configuration from database/secure storage, not an actual 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 syntax error in Kotlin. A const val must be initialized using the assignment operator = and a valid string literal. Additionally, this is a key used to store/retrieve configuration from database/secure storage, not an actual 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 a redaction, it's a syntax catastrophe. You replaced a valid string constant with 'REDACTED_BY_JULES' which isn't valid Kotlin syntax. This won't compile, and for good reason.

🩹 The Fix: The original value "storage_migration_version" is just an internal SharedPreferences key name, not an actual secret. If you must keep it redacted, use private const val MIGRATION_VERSION_KEY = "REDACTED" instead.

📏 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: You broke the function call syntax. rememberSharedContentState(key: 'REDACTED_BY_JULES') is not valid Kotlin—there's a missing = between key and the value. This is like putting ketchup on ice cream: syntactically wrong and confusing.

🩹 The Fix: Restore the original string key "create_post_icon" and maybe reconsider what actually constitutes a secret. Shared element transition keys aren't exactly Fort Knox material.

📏 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: Same syntax train wreck as the other files. Function argument syntax in Kotlin uses =, not :. This breaks the shared element animation and won't even compile.

🩹 The Fix: Use rememberSharedContentState(key = "create_post_icon") to match Kotlin syntax. Or if this is in sharedMain, remember Compose Multiplatform function signatures.

📏 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: LazyColumn's item expects key = String syntax, not key: String. This breaks both Compose and the build. You've managed to make a simple key parameter as confusing as a quantum physics lecture.

🩹 The Fix: Use item(key = "typing_indicator") - the original value was fine.

📏 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: Same syntax error. item(key: 'REDACTED_BY_JULES') isn't valid Kotlin. This breaks the chat intro header and your PR is starting to look like my first Kotlin project.

🩹 The Fix: Restore item(key = "chat_intro_header") - this is just a UI cache key, not an API 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: Two more syntax errors in Kotlin. private val KEY_ACCESS_TOKEN: 'REDACTED_BY_JULES' is invalid—you're using : instead of =. These won't compile.

🩹 The Fix: Use private val KEY_ACCESS_TOKEN = "auth_access_token" - these are SharedPreferences keys, not actual tokens.

📏 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'
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.

🔥 The Roast: Same syntax error. Missing = operator. These aren't actual secrets—they're internal key names for SharedPreferences.

🩹 The Fix: Use private val KEY_REFRESH_TOKEN = "auth_refresh_token".

📏 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: This isn't a secret—it's a key name for secure storage lookup. And the syntax is wrong for Kotlin. const val KEY_CLOUDINARY_API_KEY: 'REDACTED_BY_JULES' breaks because : isn't a value assignment.

🩹 The Fix: Use private const val KEY_CLOUDINARY_API_KEY = "cloudinary_api_key" - this is just a key name, not the actual API key.

📏 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 issue. This is a storage key name, not the actual secret. The syntax error (: instead of =) makes this uncompilable.

🩹 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: Another storage key masquerading as a secret. The original value "r2_secret_access_key" is just the key name used to look up the actual secret from secure storage, not the secret itself.

🩹 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 22, 2026

Copy link
Copy Markdown

Code Review Roast 🔥

Verdict: 11 Issues Found | Recommendation: Do Not Merge

Overview

Severity Count
🚨 critical 11
Issue Details (click to expand)
File Line Roast
app/src/main/kotlin/com/synapse/social/studioasinc/data/local/database/StorageMigration.kt 40 Invalid Kotlin syntax - colon instead of equals for string constant
app/src/main/kotlin/com/synapse/social/studioasinc/feature/createpost/createpost/components/CreatePostTopBar.kt 82 Broken function call syntax in Compose shared element
app/src/main/kotlin/com/synapse/social/studioasinc/feature/home/home/HomeScreen.kt 186 Broken function call syntax in Compose shared element
app/src/main/kotlin/com/synapse/social/studioasinc/feature/inbox/inbox/screens/ChatMessageList.kt 94 Invalid LazyColumn item key syntax
app/src/main/kotlin/com/synapse/social/studioasinc/feature/inbox/inbox/screens/ChatMessageList.kt 162 Same invalid item key syntax
app/src/main/kotlin/com/synapse/social/studioasinc/ui/settings/SettingsDestination.kt 118 Invalid const val declaration syntax
iosApp/iosApp/Features/Auth/ViewModels/AuthViewModel.swift 31 Invalid Swift syntax - missing string value after type annotation
shared/src/androidMain/kotlin/com/synapse/social/studioasinc/shared/data/crypto/store/AndroidSignalStore.kt 113 Invalid Kotlin property syntax -
shared/src/commonMain/kotlin/com/synapse/social/studioasinc/shared/data/auth/SupabaseAuthenticationService.kt 31 Invalid property syntax -
shared/src/commonMain/kotlin/com/synapse/social/studioasinc/shared/data/auth/SupabaseAuthenticationService.kt 32 Invalid property syntax -
shared/src/commonMain/kotlin/com/synapse/social/studioasinc/shared/data/repository/StorageRepositoryImpl.kt 31 Invalid const val syntax -
shared/src/commonMain/kotlin/com/synapse/social/studioasinc/shared/data/repository/StorageRepositoryImpl.kt 32 Invalid const val syntax -
shared/src/commonMain/kotlin/com/synapse/social/studioasinc/shared/data/repository/StorageRepositoryImpl.kt 35 Invalid const val syntax -

🏆 Best part: I appreciate the security mindset—wanting to redact secrets is good!. However, the execution here is like trying to put out a fire with gasoline.

💀 Worst part: Every single changed line introduces a syntax error that prevents compilation. This PR cannot be merged in its current state—it would break the entire app. Also, none of these are actual secrets; they're just key names used to look up values from secure storage.

📊 Overall: Like a security guard who locks the doors but forgets the keys—this PR attempts to secure things but ends up locking everyone out (including the compiler).

Files Reviewed (7 files)
  • app/src/main/kotlin/com/synapse/social/studioasinc/data/local/database/StorageMigration.kt - 1 issue
  • app/src/main/kotlin/com/synapse/social/studioasinc/feature/createpost/createpost/components/CreatePostTopBar.kt - 1 issue
  • app/src/main/kotlin/com/synapse/social/studioasinc/feature/home/home/HomeScreen.kt - 1 issue
  • app/src/main/kotlin/com/synapse/social/studioasinc/feature/inbox/inbox/screens/ChatMessageList.kt - 2 issues
  • app/src/main/kotlin/com/synapse/social/studioasinc/ui/settings/SettingsDestination.kt - 1 issue
  • iosApp/iosApp/Features/Auth/ViewModels/AuthViewModel.swift - 1 issue
  • shared/src/androidMain/kotlin/com/synapse/social/studioasinc/shared/data/crypto/store/AndroidSignalStore.kt - 1 issue
  • shared/src/commonMain/kotlin/com/synapse/social/studioasinc/shared/data/auth/SupabaseAuthenticationService.kt - 2 issues
  • shared/src/commonMain/kotlin/com/synapse/social/studioasinc/shared/data/repository/StorageRepositoryImpl.kt - 3 issues

Reviewed by laguna-m.1-20260312:free · Input: 555.2K · Output: 8.3K · Cached: 313.5K

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