-
Notifications
You must be signed in to change notification settings - Fork 2.3k
FINERACT-2171: Make Slack messages discoverable by search engines via AsciiDoc archiving #5388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FINERACT-2171: Make Slack messages discoverable by search engines via AsciiDoc archiving #5388
Conversation
fineract-doc/slack.gradle
Outdated
| outputs.dir outputDir | ||
|
|
||
| doLast { | ||
| def token = System.getenv('SLACK_TOKEN') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Gradle task pulls Slack messages via the Slack API using a token from SLACK_TOKEN. If this token is accidentally leaked (in build logs, CI cache, config, etc), it could expose your Slack workspace. The script doesn’t include any secure handling/obfuscation of the token – it’s passed raw to HTTP connections.
Risk
Token might be logged in CI output.
Token could end up in Gradle caches, backups, or public artifacts if misconfigured.
Slack rate/lifecycle issues (tokens expire or permissions change).
Mitigation ideas
Require encrypted secrets or use a tool, not raw env token.
Add explicit handling to avoid leaking token in logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the security review, Aman!
I've addressed the concerns in the latest push:
-
Switched from
System.getenvtoproviders.environmentVariable("SLACK_TOKEN").getOrNull().
This aligns with modern Gradle best practices for input handling and configuration cache compatibility, ensuring we don't inadvertently bake secrets into the cache key in an unsafe way (which can happen with raw environment access). -
Confirmed that the token variable is never printed or logged. The script only logs high-level lifecycle status messages.
-
The intention (which I’ll explicitly clarify in the documentation) is that this token should strictly be a Bot User OAuth Token with limited read-only scopes (
channels:read,history:read), rather than a full user token. This significantly limits the blast radius if the token were ever mishandled.
With these changes, the secret handling follows standard and safe practices for CI-injected secrets in Gradle scripts.
b996353 to
a3bf00f
Compare
adamsaghy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really dont like this idea.
Fineract should not have much to do with this...
@meonkeys Am I missing something here?
|
@meonkeys Why would we want Gradle and the build take care of this? I don't get it. This should be rather a crawler running outside of the fineract codebase to handle this. I'm not even sure about the value of publishing the slack messages to be fair. |
|
I do want FINERACT-2171 implemented and I'm happy to see work being done on it. I would like to offer some suggestions on the implementation. For example, I'd like it kept separate from the main Fineract source code. My first thought is that if ASF or someone can do this for us, that would be ideal. I asked for help in #asfinfra:
They don't do that, but they had a couple suggestions:
Here are my ideas. Feedback welcome!
Additional ideas, maybe post-MVP:
|
|
@airajena , what do you think? Will you create a PR against https://github.com/apache/fineract-chat-archive instead? I'll add my long comment above to FINERACT-2171 . Please let me know your thoughts: Let's discuss in #fineract chat or on the mailing list or in comments on FINERACT-2171. Or directly... I'm happy to do a phone/video call at your convenience. |
Thanks everyone for the feedback — this makes sense. I agree that this functionality doesn’t belong in the core Fineract build and should live separately. Thanks @meonkeys for creating apache/fineract-chat-archive — that looks like the right direction. I’m happy to move this work there and adapt the implementation accordingly (standalone Gradle project, runnable locally + via GitHub Actions, idempotent archive updates, etc.). I’ll take a look at the new repo and follow up with a PR there. Happy to discuss details in comments or on #fineract chat as suggested. |
Description:
This PR implements an automated mechanism to fetch public Slack conversations and archive them as static AsciiDoc files within the Fineract documentation. This directly addresses FINERACT-2171 by making ephemeral community knowledge indexable by search engines and permanently accessible.
Changes
fineract-doc/slack.gradleto handle the fetching and generation logic.fineract-doc/build.gradleto include the archiving task as a dependency ofasciidoctor.index.adocto include the new "Slack Archive" chapter.Testing
./gradlew :fineract-doc:asciidoctorsucceeds both with and withoutSLACK_TOKEN.spotlessApplyto ensure the new Gradle script follows project formatting standards.Related Issue
Fixes FINERACT-2171