Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
**Vulnerability:** CSV formula injection mitigation was naive, missing leading whitespace, tabs, and newlines.
**Learning:** Checking `/^[=+\-@]/` is not sufficient, as OWASP states that spaces and tabs before the formula triggers will also execute the formula in applications like Excel.
**Prevention:** Use a regex that allows leading whitespace (e.g. `/^[\s\uFEFF\xA0]*[=+\-@\t\r\n]/`) and include standalone tabs or new lines which are also injection vectors.
## 2026-06-25 - Frontend Input Length Limit (DoS Mitigation)
**Vulnerability:** The YouTube URL `<Input />` component in the desktop app lacked a `maxLength` attribute, potentially allowing users to paste excessively long strings, leading to UI thread lockups or memory exhaustion (Denial of Service).
**Learning:** Even client-side inputs communicating with a secure backend should enforce length constraints at the DOM level to prevent resource exhaustion vulnerabilities and performance degradation.
**Prevention:** Enforce length limits (e.g., `maxLength={2048}`) on all user-facing text `<Input />` components.
6 changes: 6 additions & 0 deletions apps/desktop/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,12 @@ describe("App", () => {
});
});

it("enforces a maximum length on the YouTube URL input", () => {
render(<App />);
const input = screen.getByPlaceholderText(/YouTube URL.../i);
expect(input).toHaveAttribute("maxLength", "2048");
});

it("rejects non-http YouTube URL", async () => {
render(<App />);
const input = screen.getByPlaceholderText(/YouTube URL.../i);
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ export function App() {
disabled={analysisInFlight || isStarting || isImporting}
className="h-10 flex-1 border-0 bg-transparent text-slate-100 placeholder:text-slate-500 focus-visible:ring-cyan-300"
aria-label="YouTube URL"
maxLength={2048}
/>
</div>
<Button
Expand Down
Loading