Skip to content

chore: build and security hygiene - #2421

Merged
dkhawk merged 3 commits into
mainfrom
chore/build-security-hygiene
Sep 17, 2026
Merged

dkhawk merged 3 commits into
mainfrom
chore/build-security-hygiene

Conversation

@dkhawk

@dkhawk dkhawk commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Align AGENTS.md with Java 17 bytecode and PR title guidelines
  • Update libs.versions.toml with room, ktor, and serialization plugins
  • Add check_api_key.gradle.kts build validation script
  • Remove redundant kotlin-android plugin application in tutorials

Reviewer

@LoyalAbbas

- Align AGENTS.md with Java 17 bytecode and PR title guidelines
- Update libs.versions.toml with room, ktor, and serialization plugins
- Add check_api_key.gradle.kts build validation script
- Remove redundant kotlin-android plugin application in tutorials
Comment thread gradle/libs.versions.toml Fixed
Comment thread gradle/libs.versions.toml Fixed
Comment thread gradle/libs.versions.toml Fixed
Comment thread gradle/libs.versions.toml Fixed
Comment thread gradle/libs.versions.toml Fixed
Comment thread gradle/libs.versions.toml Fixed
Comment thread gradle/libs.versions.toml Fixed
@dkhawk
dkhawk force-pushed the chore/build-security-hygiene branch from 6c5118b to 4fa4d5d Compare September 15, 2026 00:31
@dkhawk
dkhawk marked this pull request as ready for review September 15, 2026 00:38
@dkhawk
dkhawk requested a review from LoyalAbbas September 15, 2026 00:38
@dkhawk
dkhawk added this pull request to stack #2429 September 15, 2026 00:42
Comment thread check_api_key.gradle.kts Outdated

// Check for relevant key names (e.g., MAPS_API_KEY or MAPS3D_API_KEY)
val apiKey = secrets.getProperty("MAPS_API_KEY") ?: secrets.getProperty("MAPS3D_API_KEY") ?: ""
println("Checking API Key in secrets.properties: '$apiKey'")

@LoyalAbbas LoyalAbbas Sep 15, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Plaintext api key printed to build logs

Risk: Anyone running a build locally with Gradle Build Scans (--scan), sharing terminal output in an issue, or running on a self-hosted runner without CI=true will leak their live Google Maps API key in plaintext logs.
Also missing .trim(), Copy-pasted keys in secrets.properties frequently have trailing whitespace or newlines, which causes apiKey.matches(Regex("^AIza[a-zA-Z0-9_-]{35}$")) on line 106 to fail unexpectedly.

Suggestion:
val apiKey = (secrets.getProperty("MAPS_API_KEY") ?: secrets.getProperty("MAPS3D_API_KEY") ?: "").trim()
val maskedKey = if (apiKey.length > 8) "${apiKey.take(4)}...${apiKey.takeLast(4)}" else "****"
println("Checking API Key in secrets.properties: '$maskedKey'")

Please correct me if my observation is wrong ?

@LoyalAbbas LoyalAbbas 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.

LGTM

@dkhawk
dkhawk merged commit b6a0727 into main Sep 17, 2026
16 checks passed
@dkhawk
dkhawk deleted the chore/build-security-hygiene branch September 17, 2026 22:33
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.

3 participants