Skip to content

Task 8: Fix Hardcoded Credentials and Replace jcenter()#197

Open
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin/task8-fix-creds-replace-jcenter
Open

Task 8: Fix Hardcoded Credentials and Replace jcenter()#197
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin/task8-fix-creds-replace-jcenter

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented May 1, 2026

Summary

This PR addresses two security/maintenance concerns:

  1. Hardcoded credentials replaced with environment variable references (with safe defaults for local dev):

    • docker-compose.yml: MySQL container passwords and ftgo-application datasource credentials now read from env vars (MYSQL_ROOT_PASSWORD, MYSQL_USER, MYSQL_PASSWORD) with fallback defaults.
    • ftgo-flyway/build.gradle: Flyway user and password now read from FLYWAY_USER and FLYWAY_PASSWORD env vars with fallback defaults.
    • mysql/Dockerfile + mysql/init-db.sh: Replaced static schema.sql with a shell script that reads MYSQL_USER at container startup for the GRANT statement, ensuring custom users get proper database privileges.
  2. Deprecated jcenter() repository removed from root build.gradle. mavenCentral() was already present and jcenter was sunset in 2021. The only other jcenter() reference (in ftgo-order-service/build.gradle) is already commented out.

No functional changes — existing defaults preserve backward compatibility for local development.

Review & Testing Checklist for Human

  • Verify docker-compose up still works without setting any env vars (defaults should kick in)
  • Verify Gradle build still resolves all dependencies from mavenCentral() alone
  • Optionally test overriding credentials via env vars (e.g. MYSQL_USER=customuser docker-compose up)

Notes

  • jcenter() was sunset in February 2021 and is now read-only/deprecated. All packages have been migrated to Maven Central.
  • The credential defaults match the previously hardcoded values, so this is a non-breaking change.

Link to Devin session: https://app.devin.ai/sessions/63ae9590c93b48c19bde062e84cca2b2
Requested by: @WesternConcrete


Devin Review

Status Commit
⚪ Not started

Run Devin Review

💡 Connect your GitHub account to enable automatic code reviews.

Open in Devin Review (Staging)
Open in Devin Review

- docker-compose.yml: Replace hardcoded MySQL passwords with env var references using defaults
- ftgo-flyway/build.gradle: Replace hardcoded Flyway credentials with env var references
- build.gradle: Remove deprecated jcenter() repository (mavenCentral() already present)

Co-Authored-By: Wes Convery <2wconvery@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration[bot]

This comment was marked as resolved.

Replace static schema.sql with init-db.sh shell script that reads
MYSQL_USER at container startup, ensuring custom users get proper
privileges on the ftgo database.

Addresses Devin Review feedback about hardcoded username in GRANT.

Co-Authored-By: Wes Convery <2wconvery@gmail.com>
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