Skip to content
Open
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
5 changes: 5 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
**Vulnerability:** Python `requests` (and similar libraries) will happily stream any content type, allowing attackers to force a crawler to download and process unexpected binary files or large data streams.
**Learning:** Scripts that fetch content (like for embeddings or metadata) often check size limits but neglect `Content-Type`. This can waste resources or trigger errors in parsers.
**Prevention:** Always validate `Content-Type` headers against a strict allowlist (e.g., `text/html`, `application/xml`) *before* iterating over the response content.

## 2025-02-21 - Reverse Tabnabbing in Dynamic Links
**Vulnerability:** External links created dynamically without `target="_blank"` and `rel="noopener noreferrer"` can allow the newly opened tab to access the `window.opener` object, leading to potential phishing attacks via reverse tabnabbing. Additionally, omitting `noreferrer` leaks referer information.
**Learning:** React components that conditionally render links as internal or external based on the URL often neglect to conditionally apply the correct `target` and `rel` attributes.
**Prevention:** Always ensure dynamic link components evaluate whether a link is external and explicitly apply `target="_blank"` and `rel="noopener noreferrer"`.
7 changes: 6 additions & 1 deletion src/components/HomepageContent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ function Section({ title, items }) {
<div style={{ marginBottom: '0.25rem' }}>
<strong>
{item.link ? (
<Link to={item.link} className="inline-flex items-center gap-1 group">
<Link
to={item.link}
className="inline-flex items-center gap-1 group"
target={isExternal ? "_blank" : undefined}
rel={isExternal ? "noopener noreferrer" : undefined}
>
{item.title}
{isExternal ? (
<ExternalLinkIcon className="transition-transform group-hover:translate-x-1 group-hover:-translate-y-1 group-focus-visible:translate-x-1 group-focus-visible:-translate-y-1" />
Expand Down
Loading