Repository navigation
Fix RSS feed bugs, enhance security, and add unit tests - #50
Merged
Merged
Conversation
- updateRSSFeeds no longer appends a duplicate entry when a feed with the same URL is re-processed, it now updates the existing entry in place - RemoveFeedFromList now scans all records instead of aborting with an error on the first name/channel mismatch - AddUrlToList/RemoveFeedFromList validate the feed name and channel id to prevent path traversal via crafted Discord messages (the values end up in the on-disk record filename) - !rss add/del now require the Discord 'Manage Server' permission, previously any guild member could manage RSS feeds
- config: New/Load happy path and panic-on-missing-file - rss: AddUrlToList/RemoveFeedFromList/LoadFeeds against a temp simple-json-db instance, plus the internal updateRSSFeeds/ updateMessageQueue helpers and the new input validation - messagehandler: Manage Server permission check against a seeded discordgo state cache (no network calls), plus the no-op branches of ReplyCommands - moritzhandler/emojihandler: no-op branches of ReplyCommands (own messages, no match / no custom emoji)
- add .dockerignore excluding data/ (contains config.yml with the bot token and the RSS database), .git and .github from the build context - docker-compose.yml now bind-mounts ./data:/app/data at runtime instead of relying on COPY . . to include it in the image, which also fixes the RSS database not persisting across image rebuilds - README: document that data/config.yml must exist on the host before running via docker compose
code-coverage.yml: - add pull-requests: read, required by upload-code-coverage to look up the PR on push-triggered runs - pin gocover-cobertura to v1.5.0 instead of @latest - run tests with -race, the rss package uses mutexes to guard shared state docker-build-push.yaml: - bump and pin docker/login-action, docker/metadata-action and docker/build-push-action to their latest release by commit SHA, actions/checkout to v6 - drop the id-token: write permission, nothing in the workflow uses it - remove dead pull_request conditionals, this workflow never triggers on pull_request
Contributor
Code Coverage OverviewLanguages: Go Go / code-coverage/go-testThe overall line coverage in commit 4b24ce1 in the Show a line coverage summary of the most impacted files.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.