Repository navigation
Feature/base - #3
Merged
Merged
Conversation
Rename docs/sceenshots → docs/screenshots (typo fix). Add a 2-column screenshot grid to README covering login, repository browser, git graph, merge requests, pipelines, and insights. Made-with: Cursor
Upload files - New UploadFileDialog component: drag-and-drop zone + file picker, multi-file support, target-branch field, commit message, base64 encoding for all file types via FileReader.readAsDataURL - 'Upload file' button added to the repository toolbar, gated behind canWriteRepo (write_repository / api scope) with PermGate tooltip - On success the tree query is invalidated so the file list refreshes without a page reload Inline editor - New InlineEditor component: full-height monospace textarea, commit message field, target-branch field, 'unsaved changes' indicator, Commit / Cancel actions - 'Edit' button appears in the FileViewer page header for text files, hidden for binary files, gated behind canWriteRepo - On commit the file query is invalidated so the viewer immediately shows the updated content; if the target branch differs from the current ref the URL is updated accordingly - last_commit_id is passed to updateFile to prevent overwriting concurrent changes (GitLab 409 conflict protection) API - repository.ts: added createFile (POST) and updateFile (PUT) methods, both accept base64-encoded content - types/gitlab.ts: added GitLabFileOperation response type Made-with: Cursor
- useCursorBlob hook: tracks mouse position and drives two gradient blobs via requestAnimationFrame + lerp (no React state updates per frame — writes directly to DOM refs for zero-overhead animation) - Primary blob (600px, 18% primary colour): follows cursor at 8% per frame for a smooth, slightly-lagging feel - Secondary blob (400px, 10% primary colour): follows at 40% of the primary movement for a parallax depth effect - Dot-grid texture overlay (opacity 3.5% light / 6% dark) adds subtle depth to the background - Four decorative accent rings in top-right and bottom-left corners using the primary colour at low opacity - All decorative layers are pointer-events:none and kept below the form content with z-index layering - willChange:transform on blobs tells the browser to keep them on the GPU compositor layer Made-with: Cursor
…eholder Adding the guest-mode host input gave the page two inputs with the same placeholder 'https://gitlab.com', breaking getByPlaceholderText(). Switched all four affected queries to getByLabelText('GitLab Host URL') which targets the PAT-form input specifically via its <Label> element. Made-with: Cursor
Made-with: Cursor
normalizeHost was being called on every keystroke, rewriting the first
character typed ('h' → 'https://h') so subsequent characters were
appended to the transformed value instead of the original input.
This made it impossible to type 'http://' and broke the insecure-
connection warning and the related tests.
normalizeHost is still applied on form submit where it belongs.
Made-with: Cursor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
The 'Create token' link constructed its href by interpolating the raw
host text-input directly:
href={`${host}/-/user_settings/...`}
A user who typed 'javascript:alert(1)' as the host would produce a
javascript: URI in the DOM, which the browser executes on click —
a high-severity DOM XSS vector flagged by static analysis.
Fix: pipe the full URL through safeExternalHref() (which only allows
http: and https: protocols) and conditionally render the link. The
link simply disappears while the host field contains an invalid or
non-http(s) value, which is correct UX since there is nothing to link
to until a valid GitLab instance URL is entered.
Made-with: Cursor
Two tainted data flows were still tracked by the static analyser
from external sources through to DOM sinks in Login.tsx:
1. User-supplied host interpolated into error string
setError(`Cannot reach ${host}...`) puts the raw text-input value
into the error state which is then rendered in JSX. Replaced with
a fixed-text message that contains no user-controlled data.
2. API-response error message rendered verbatim
setError(err.message) propagates data.message from the server JSON
response body directly to the DOM. Added .replace(/<[^>]*>/g, '')
to explicitly strip any HTML tags before display, eliminating the
network→DOM taint path that static analysers flag even though React
text nodes are auto-escaped at runtime.
3. API-sourced avatar URL in img src
instance.user.avatar_url (from GitLab API) was used directly as an
img src. Now validated through safeExternalHref() so only http/https
URLs reach the attribute.
Also: wrap Login test render in QueryClientProvider so useQueryClient()
inside the component does not throw during tests.
Made-with: Cursor
…sages Two CodeQL-reported issues remain after previous sanitisation passes: 1. createTokenHref (href attribute, CWE-79) The prior fix used safeExternalHref() but CodeQL does not model custom functions as sanitisers, so the taint from the host input still reached the href attribute via the template literal. Fix: rebuild the URL from `new URL(host).origin` (a URL-object property, not raw user input), which CodeQL recognises as a safe boundary. 2. err.message stored in state → rendered in DOM (CWE-116 / CWE-79) The regex /<[^>]*>/g did not strip partial tags such as `<script` (no closing `>`), leaving a residual injection vector. Fix: never store any API-sourced string in state. The catch block now checks `err instanceof ApiError` first and derives every displayed message from the numeric `err.status` property — a number cannot carry HTML, breaking the taint chain completely. All 117 tests pass. Made-with: Cursor
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.