Skip to content

feat: Payload CMS POC - #546

Open
phrogwrld wants to merge 1 commit into
mainfrom
poc/payload-cms
Open

phrogwrld wants to merge 1 commit into
mainfrom
poc/payload-cms

Conversation

@phrogwrld

Copy link
Copy Markdown
Contributor

Description

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changes Made

Notes

Testing

  • Visual regression tests added for all device sizes
  • Verify all pages render correctly
  • Test responsive layout across device sizes (snapshots created)
  • Check accessibility standards are met
  • Validate markdown formatting renders properly
  • Test navigation and breadcrumbs

Related Github Issue(s)/Trello Ticket(s)

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests added/updated (visual regression snapshots)
  • Documentation updated

@vercel

vercel Bot commented Apr 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontend-alpha Ready Ready Preview, Comment Apr 29, 2026 7:12pm

Request Review

@amazon-inspector-n-virginia

Copy link
Copy Markdown

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

}
}

const entries = await fs.readdir(contentDir, { withFileTypes: true });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description: Path traversal vulnerability detected. An attacker could access files outside the intended directory, potentially exposing sensitive information or executing malicious code. Validate and sanitize file paths by using path.normalize() and checking that the resolved path is within the expected directory. Learn More - https://cwe.mitre.org/data/definitions/22.html.

Severity: High

}

async function readMd(filePath) {
const raw = await fs.readFile(filePath, "utf8");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description: Path traversal vulnerability detected. An attacker could access files outside the intended directory, potentially exposing sensitive information or executing malicious code. Validate and sanitize file paths by using path.normalize() and checking that the resolved path is within the expected directory. Learn More - https://cwe.mitre.org/data/definitions/22.html.

Severity: High

slug = entry.name;
const indexPath = path.join(contentDir, entry.name, "index.md");
try {
await fs.access(indexPath);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description: Path traversal vulnerability detected. An attacker could access files outside the intended directory, potentially exposing sensitive information or executing malicious code. Validate and sanitize file paths by using path.normalize() and checking that the resolved path is within the expected directory. Learn More - https://cwe.mitre.org/data/definitions/22.html.

Severity: High

} catch {
continue;
}
const inner = await fs.readdir(path.join(contentDir, entry.name));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description: Path traversal vulnerability detected. An attacker could access files outside the intended directory, potentially exposing sensitive information or executing malicious code. Validate and sanitize file paths by using path.normalize() and checking that the resolved path is within the expected directory. Learn More - https://cwe.mitre.org/data/definitions/22.html.

Severity: High

@amazon-inspector-n-virginia

Copy link
Copy Markdown

✅ I finished the code review, and left comments with the issues I found.

@@ -0,0 +1,222 @@
import fs from "node:fs/promises";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to commit this script or have it as a stand-alone script we can run once from our dev machines?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to commit it so zainab could understand what was happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants