Skip to content

fix(OFJAVA-011): CU-86akdypzd Slack channel ID hardcoded as literal argument in TestApplication instead of externalized config - #2323

Draft
flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/ofjava-011-7bc94308-c1688cba
Draft

flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/ofjava-011-7bc94308-c1688cba

Conversation

@flamingo

@flamingo flamingo Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Closes findings from rule OFJAVA-011 — Slack channel ID hardcoded as literal argument in TestApplication instead of externalized config.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

# Fix confidence Finding Location
1 🟡 70 medium Slack channel ID hardcoded as literal argument in TestApplication instead of externalized config openframe/services/openframe-test/src/main/java/com/openframe/test/TestApplication.java:26

What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.


Run: https://product-hub.flamingo.so/admin/code-review
Run id: c1688cba-c9bc-481b-b917-2b7f45403ab4

Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.

ClickUp task: CU-86akdypzd OpenFrame Kafka config hardcoding fixes (5 PRs)

…stApplication instead of externalized config

@flamingo flamingo Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🦩 What this fix changed, finding by finding

1 finding(s) fixed in this draft — 1 explained inline on the diff.

public static void main(String[] args) {
AllureJunitPlatform allureListener = new AllureJunitPlatform();
SummaryGeneratingListener summaryListener = new SummaryGeneratingListener();
SlackClient slackClient = new SlackClient(System.getenv("SLACK_OAUTH_TOKEN"), "C0AHS6C6G3H");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🦩 🔴 Slack channel ID hardcoded as literal argument in TestApplication instead of externalized config

In TestApplication.main(), replaced the hardcoded Slack channel ID literal "C0AHS6C6G3H" with System.getenv("SLACK_CHANNEL_ID"), mirroring the adjacent SLACK_OAUTH_TOKEN env var pattern so the channel ID is externalized per-environment. Risk: this requires the SLACK_CHANNEL_ID environment variable to be set in all deployment/CI environments that previously relied on the inline default; if unset, SlackClient will receive null, which is unverified to be handled gracefully by SlackClient/SlackListener — a complete fix may need env docs/deployment config updates outside this file.

🤖 Prompt for AI agents
In openframe/services/openframe-test/src/main/java/com/openframe/test/TestApplication.java around line 26, review and complete this code-review fix: Slack channel ID hardcoded as literal argument in TestApplication instead of externalized config.
What the draft fix changed: In `TestApplication.main()`, replaced the hardcoded Slack channel ID literal `"C0AHS6C6G3H"` with `System.getenv("SLACK_CHANNEL_ID")`, mirroring the adjacent `SLACK_OAUTH_TOKEN` env var pattern so the channel ID is externalized per-environment. Risk: this requires the `SLACK_CHANNEL_ID` environment variable to be set in all deployment/CI environments that previously relied on the inline default; if unset, `SlackClient` will receive `null`, which is unverified to be handled gracefully by `SlackClient`/`SlackListener` — a complete fix may need env docs/deployment config updates outside this file.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟡 70 medium — react 👍/👎 to teach the reviewer

@flamingo flamingo Bot changed the title fix(OFJAVA-011): Slack channel ID hardcoded as literal argument in TestApplication instead of externalized config fix(OFJAVA-011): CU-86akdypzd Slack channel ID hardcoded as literal argument in TestApplication instead of externalized config Sep 7, 2026
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.

0 participants