Repository navigation
Conversation
Add add_attachment_content (base64, 64 KB default cap), add_attachment_file, list_attachments and delete_attachment for user stories, tasks, issues, epics and wiki pages (for wiki pages ref is the page id; the page must belong to the given project). Refs #287. add_attachment_file only reads inside TAIGA_MCP_UPLOAD_DIR and is not registered when the variable is unset: paths are resolved and confined to the directory, only regular files are accepted, the file is opened without following a final symlink and re-verified on the opened descriptor, including its real path, before its size is checked (25 MB default cap). Invalid TAIGA_MCP_MAX_*_BYTES values fail at startup. delete_attachment is refused unless the attachment belongs to the stated project and matches the expected name. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RX2iLdY1S4Y5HKEj22MpyF
Describe the four attachment tools (including wiki pages), the TAIGA_MCP_UPLOAD_DIR and TAIGA_MCP_MAX_*_BYTES variables, the upload-directory security model and its known limits (POSIX only, race protection relies on /proc, hardlinks), and add the new write tools to the destructive-tools note. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RX2iLdY1S4Y5HKEj22MpyF
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/us-14050-mcp-create-custom-attribute #288 +/- ##
================================================================================
+ Coverage 98.25% 98.41% +0.15%
================================================================================
Files 12 12
Lines 1607 1762 +155
Branches 154 174 +20
================================================================================
+ Hits 1579 1734 +155
Misses 19 19
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
Add four MCP tools so agents can manage attachments: add_attachment_content
(base64, 64 KB default cap), add_attachment_file, list_attachments and
delete_attachment. They work on user stories, tasks, issues, epics and wiki
pages (for wiki pages, ref is the page id and the page must belong to the
given project).
add_attachment_file reads only inside TAIGA_MCP_UPLOAD_DIR and is not
registered when the variable is unset. Paths are confined to that directory,
only regular files are accepted, the file is opened without following a final
symlink and re-verified on the open descriptor (inode and real path) before its
size is checked (25 MB default cap). delete_attachment is refused unless the
attachment belongs to the stated project and matches the expected name.
Known limits (POSIX only, the race check relies on /proc, hardlinks are
undetectable) are documented in docs/mcp.rst.
Not included: get_attachment / downloads, milestones.
References
Fix #287
Stacked on #283.
Checklist
inv lint(ruff passes on the changed files; the repo-wide ruff hook has 102 existing findings)changesfile included (changes/287.feature)AI usage
Model: Claude Sonnet 5.5 (Claude Code), with Opus for reviews. Scope: design,
implementation, tests, docs and security hardening of the attachment tools,
written with a human approving each step. Prompts: add support for uploading
attachments to the MCP server; both base64 and path routes, with the path
restricted to an upload directory; add list and delete tools; fix the upload
race; add wiki pages (issue #287).
Agent usage
🤖 Generated with Claude Code
https://claude.ai/code/session_01RX2iLdY1S4Y5HKEj22MpyF