GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — chore: move content to private repo with build-time clone by Saturate · Pull Request #138 · Saturate/AKJIO Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (34)
📝 WalkthroughWalkthroughThe build now clones content from a private repository using GitHub credentials. Post discovery uses a ChangesContent retrieval and build integration
Draft filtering
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CI
participant Build
participant ContentRepo
participant PostLoader
CI->>Build: pass CONTENT_TOKEN and CONTENT_REPO_URL
Build->>ContentRepo: clone content during prebuild
Build->>PostLoader: read cloned MDX files
PostLoader->>PostLoader: parse draft frontmatter
PostLoader-->>Build: return non-draft posts
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
utils/parseFrontmatter.ts (1)
32-56: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winCentralize draft recognition in the frontmatter parser. Raw, unanchored document searches can suppress published posts based on prose or code blocks, and the three implementations can diverge.
utils/parseFrontmatter.ts#L32-L56: match an anchoreddraftkey only inside fenced frontmatter.app/actions.ts#L92-L94: useparseFrontmatter(content, id).draft.app/llms.txt/route.ts#L41-L41: use the same parsed draft value.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@utils/parseFrontmatter.ts` around lines 32 - 56, Centralize draft detection in parseFrontmatter by matching only an anchored draft key within the fenced frontmatter block, then return that parsed boolean. In app/actions.ts lines 92-94 and app/llms.txt/route.ts line 41, replace independent draft checks with parseFrontmatter(content, id).draft, preserving each caller’s existing behavior.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 29-32: Update the create-github-app-token step to use the required
app-id input instead of client-id, while continuing to source it from the secret
containing the numeric GitHub App ID; preserve the existing private-key input
and CONTENT_TOKEN flow.
- Around line 29-34: Add the actions/create-github-app-token configuration key
permission-contents with read access alongside the existing token inputs,
keeping the repository scope unchanged and limiting the generated token to
contents read permission.
---
Outside diff comments:
In `@utils/parseFrontmatter.ts`:
- Around line 32-56: Centralize draft detection in parseFrontmatter by matching
only an anchored draft key within the fenced frontmatter block, then return that
parsed boolean. In app/actions.ts lines 92-94 and app/llms.txt/route.ts line 41,
replace independent draft checks with parseFrontmatter(content, id).draft,
preserving each caller’s existing behavior.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f45f0347-9bb6-4479-9692-54e33d36252e
content/posts/_drafts/led-video-wall/arrived.jpg is excluded by !**/*.jpgcontent/posts/_drafts/led-video-wall/tnuts2020.jpg is excluded by !**/*.jpgcontent/posts/hello-world/NASA-Sunrise-for-web.jpg is excluded by !**/*.jpgcontent/posts/unindexedchallenge/screenshot.png is excluded by !**/*.png.github/workflows/ci.yml.gitignoreapp/actions.tsapp/llms.txt/route.tscontent/404.mdxcontent/about.mdxcontent/design-guide.mdxcontent/index.mdxcontent/posts/_drafts/getting-the-frontend-build-right.mdxcontent/posts/_drafts/led-video-wall/building-a-led-wall.mdxcontent/posts/_drafts/led-video-wall/making-a-led-video-wall.mdxcontent/posts/ai-coding-security-infrastructure/index.mdxcontent/posts/ai-ownership-infrastructure/components/HardwarePriceChart/HardwarePriceChart.module.csscontent/posts/ai-ownership-infrastructure/components/HardwarePriceChart/HardwarePriceChart.tsxcontent/posts/ai-ownership-infrastructure/index.mdxcontent/posts/allans-law/index.mdxcontent/posts/bankgpt-ctf-writeup/index.mdxcontent/posts/better-tab-names/index.mdxcontent/posts/clear-cloudflare-cache-from-vsts-release/index.mdxcontent/posts/enable-experimental-devtool-features/index.mdxcontent/posts/healthgpt-ctf-writeup/index.mdxcontent/posts/hello-world/index.mdxcontent/posts/migrating-repos-to-monorepo-with-git-history/index.mdxcontent/posts/pnpm-sbom/index.mdxcontent/posts/speed-up-npm-install-on-vsts/index.mdxcontent/posts/speeding-up-my-terminal/index.mdxcontent/posts/troyden-malware-investigation/index.mdxcontent/posts/unindexedchallenge/index.mdxcontent/privacy.mdxcontent/stuff-i-use.mdxcontent/work.mdxpackage.jsonscripts/clone-content.shutils/parseFrontmatter.ts
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| uses: actions/create-github-app-token@v2 | ||
| with: | ||
| client-id: ${{ secrets.APP_CLIENT_ID }} | ||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== workflow relevant lines ==" sed -n '1,120p' .github/workflows/ci.yml 2>/dev/null || true echo echo "== locate token usage references ==" rg -n "CONTENT_TOKEN|APP_CLIENT_ID|APP_PRIVATE_KEY|APP_ID|create-github-app-token" .github/workflows || true
Repository: Saturate/AKJIO
Length of output: 1651
🌐 Web query:
actions/create-github-app-token v2 inputs app-id client-id
💡 Result:
The actions/create-github-app-token action uses both app-id and client-id to identify the GitHub App for token generation, but their roles have evolved [1][2]. In version 2 and subsequent releases, the client-id input was introduced as the recommended way to identify the GitHub App [1][2]. GitHub now explicitly recommends using the GitHub App's Client ID for authentication [2][3]. Key points regarding these inputs: - Client ID Preference: The action is designed to prefer client-id [2]. If both client-id and app-id are provided, client-id takes precedence [2]. - Deprecation: The app-id input is considered deprecated [1][2]. While it remains available for backwards compatibility in existing workflows, it is no longer required and users are encouraged to migrate to client-id [2]. - Runtime Behavior: If neither client-id nor app-id is provided, the action will return an error [2]. You can find your GitHub App's Client ID on the app's settings page [3]. It is distinct from the App ID [3]. When updating your workflow, replace your app-id configuration with client-id [2][3].
Citations:
client-id input and deprecate app-id actions/create-github-app-token#353🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== fetch action metadata and relevant manifests ==" tmp="$(mktemp -d)" curl -fsSL https://raw.githubusercontent.com/actions/create-github-app-token/v2/action.yml -o "$tmp/action.yml" curl -fsSL https://raw.githubusercontent.com/actions/create-github-app-token/v2/src/create-token.ts -o "$tmp/create-token.ts" || true curl -fsSL https://raw.githubusercontent.com/actions/create-github-app-token/v2/dist/index.js -o "$tmp/dist.js" 2>/dev/null || true echo echo "== action.yml inputs ==" cat -n "$tmp/action.yml" | sed -n '1,120p' echo echo "== create-token.ts appid/clientid references ==" if [ -f "$tmp/create-token.ts" ]; then rg -n "app-id|app_id|client-id|client_id|APP_ID|PAT_PREFIX|octokit|github" "$tmp/create-token.ts" -C 3 || true fi echo echo "== dist input parsing references if present ==" if [ -f "$tmp/dist.js" ]; then rg -n "app-id|client-id|APP_ID|CLIENT_ID|createApp|sign|jwt|token" "$tmp/dist.js" | head -n 80 || true fi
Repository: Saturate/AKJIO
Length of output: 11062
Use the required app-id input.
actions/create-github-app-token@v2 requires app-id in its action metadata; client-id is not a declared input here. This step will fail before producing CONTENT_TOKEN, so the build cannot clone private content. Ensure the referenced secret contains the numeric GitHub App ID.
- client-id: ${{ secrets.APP_CLIENT_ID }} + app-id: ${{ secrets.APP_ID }}
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| uses: actions/create-github-app-token@v2 | |
| with: | |
| client-id: ${{ secrets.APP_CLIENT_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} |
[error] 29-29: missing input "app-id" which is required by action "actions/create-github-app-token@v2". all required inputs are "app-id", "private-key"
(action)
[error] 31-31: input "client-id" is not defined in action "actions/create-github-app-token@v2". available inputs are "app-id", "github-api-url", "owner", "permission-actions", "permission-administration", "permission-checks", "permission-codespaces", "permission-contents", "permission-custom-properties-for-organizations", "permission-dependabot-secrets", "permission-deployments", "permission-email-addresses", "permission-enterprise-custom-properties-for-organizations", "permission-environments", "permission-followers", "permission-git-ssh-keys", "permission-gpg-keys", "permission-interaction-limits", "permission-issues", "permission-members", "permission-metadata", "permission-organization-administration", "permission-organization-announcement-banners", "permission-organization-copilot-seat-management", "permission-organization-custom-org-roles", "permission-organization-custom-properties", "permission-organization-custom-roles", "permission-organization-events", "permission-organization-hooks", "permission-organization-packages", "permission-organization-personal-access-token-requests", "permission-organization-personal-access-tokens", "permission-organization-plan", "permission-organization-projects", "permission-organization-secrets", "permission-organization-self-hosted-runners", "permission-organization-user-blocking", "permission-packages", "permission-pages", "permission-profile", "permission-pull-requests", "permission-repository-custom-properties", "permission-repository-hooks", "permission-repository-projects", "permission-secret-scanning-alerts", "permission-secrets", "permission-security-events", "permission-single-file", "permission-starring", "permission-statuses", "permission-team-discussions", "permission-vulnerability-alerts", "permission-workflows", "private-key", "repositories", "skip-token-revoke"
(action)
[error] 29-29: dangerous use of GitHub App tokens (github-app): app token inherits blanket installation permissions
(github-app)
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci.yml around lines 29 - 32, Update the
create-github-app-token step to use the required app-id input instead of
client-id, while continuing to source it from the secret containing the numeric
GitHub App ID; preserve the existing private-key input and CONTENT_TOKEN flow.
Source: Linters/SAST tools
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| uses: actions/create-github-app-token@v2 | ||
| with: | ||
| client-id: ${{ secrets.APP_CLIENT_ID }} | ||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
| owner: Saturate | ||
| repositories: akjio-content |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== workflow context ==" if [ -f .github/workflows/ci.yml ]; then nl -ba .github/workflows/ci.yml | sed -n '1,120p' else echo ".github/workflows/ci.yml not found" fi echo echo "== occurrences of create-github-app-token and permissions ==" rg -n "create-github-app-token|permission-contents|gh token|permissions:|contents:" .github/workflows || true
Repository: Saturate/AKJIO
Length of output: 215
🌐 Web query:
actions/create-github-app-token v2 permission-contents input documentation
💡 Result:
The actions/create-github-app-token action uses inputs prefixed with permission- to allow users to explicitly specify the permissions granted to the generated GitHub App installation access token [1][2]. Regarding the permission-contents input specifically: * Purpose: It defines the level of permission to grant the access token for repository contents, including commits, branches, downloads, releases, and merges [3][4]. * Valid Values: It can be set to either read or write [3][4]. * Usage: By default, the generated token inherits all of the installation's permissions [1][2]. It is recommended to explicitly list only the required permissions for a specific use case, following GitHub's best practices for controlling GITHUB_TOKEN permissions [1][2]. * General Pattern: This pattern of prefixing permission keys with permission- (e.g., contents becomes permission-contents) is used for all available permissions to leverage type intelligence and input validation provided by the GitHub Actions runner [1][5]. Note: The action requires that the selected permissions must already be granted to the GitHub App installation. If you request a permission that the installation does not possess, the action will return an error [2].
Citations:
🌐 Web query:
GitHub Actions create-github-app-token repository permissions default inherited
💡 Result:
When using the actions/create-github-app-token action, the default behavior regarding permissions is that the generated installation access token inherits all permissions currently granted to the GitHub App installation [1][2][3]. If you do not specify any permission-* inputs, the token is created with the full set of permissions associated with the app installation [4]. GitHub recommends explicitly listing only the permissions required for your specific use case to follow the principle of least privilege [1][2]. If you choose to restrict the token's permissions using permission-* inputs, the action will attempt to limit the token's capabilities to the intersection of the requested permissions and those granted to the App installation [5][6]. Note that the token cannot be granted any permissions that the original App installation does not already possess [1][6]. In versions of the action prior to 2.0.4, there were known issues where providing permission-* inputs did not effectively restrict the token's permissions, but this behavior has been corrected in subsequent versions [5][7]. It is also important to distinguish between App permissions and Installation permissions: installation-specific permissions are determined when an app is installed on an account or repository [1][3]. If additional permissions are added to the App later, an administrator must approve these new permissions before they become active on the existing installation [1][2].
Citations:
permission-* option with actions/create-github-app-token does not restrict token permissions actions/create-github-app-token#237🌐 Web query:
GitHub Actions create-github-app-token README default permissions repositories contents
💡 Result:
The GitHub Action create-github-app-token manages GitHub App installation access tokens with specific defaults regarding repository scope and permissions. Default Repository Scope If neither the owner nor the repositories inputs are specified, the generated token is scoped by default to only the current repository [1][2]. When the owner input is provided but the repositories input remains empty, the token is scoped to all repositories associated with that GitHub App installation [1][2]. Default Permissions By default, the generated token inherits all permissions granted to the GitHub App installation [2][3]. Explicit Permissions Configuration You can optionally restrict these permissions using inputs prefixed with permission- (e.g., permission-contents for repository contents, commits, and branches) [2][4]. When using these inputs, you must specify the desired level (typically read or write) [4][5]. It is recommended to explicitly list only the necessary permissions for your use case to follow the principle of least privilege, similar to how GitHub recommends controlling the permissions of the default GITHUB_TOKEN [2][3]. Important Considerations - Installation Permissions: The permissions assigned to an installation are determined when the app is installed. If you attempt to request a permission via the action that the installation does not possess, the action will return an error [3]. - Token Lifecycle: By default, the token is revoked during the post-action step after the job completes, unless the skip-token-revoke input is set to true [1][6]. - Documentation: The action supports all standard GitHub repository permissions; these are defined in the action.yml configuration file and can be referenced by prefixing the permission key with permission- [4][5].
Citations:
🌐 Web query:
gh create-github-app-token permission-contents read repository scoping
💡 Result:
There is no command named gh create-github-app-token in the official GitHub CLI (gh) [1]. The command you are likely referring to is the GitHub Action actions/create-github-app-token [2][3], which is used within GitHub Actions workflows to generate an installation access token for a GitHub App [3]. When using the actions/create-github-app-token action, you can control permissions and repository scoping as follows: Permissions Scoping You can limit the permissions of the generated token by using inputs prefixed with permission- [2][4]. For example, to grant only read access to repository contents, you would use permission-contents: read [5][4]. - By default, the generated token inherits all permissions granted to the GitHub App installation [2][6]. - It is highly recommended to explicitly list only the permissions required for your specific use case to follow the principle of least privilege [2][7]. - Note that you can only grant permissions that were already granted to the app installation; attempting to grant a permission the installation does not possess will result in an error [2][7]. Repository Scoping You can limit the token's access to specific repositories using the repositories input [2][4]. - If you leave the repositories input empty, the token defaults to being scoped to the current repository [2][4]. - If you provide a comma or newline-separated list of repository names (e.g., owner/repo1, owner/repo2), the token will be scoped only to those specified repositories [2][4]. - If an owner input is set but the repositories input is left empty, the token is scoped to all repositories in that owner's installation [2][4]. The actions/create-github-app-token action generates the token by making a POST request to the GitHub REST API endpoint /app/installations/{installation_id}/access_tokens [6], which natively supports passing permissions and repositories in the request body to restrict the generated token [8][9].
Citations:
permission-* option with actions/create-github-app-token does not restrict token permissions actions/create-github-app-token#237🏁 Script executed:
#!/bin/sh set -euo pipefail echo "== workflow snippet ==" sed -n '1,80p' .github/workflows/ci.yml 2>/dev/null || echo ".github/workflows/ci.yml not found" echo echo "== relevant occurrences ==" grep -R -n "create-github-app-token\|permission-contents\|permissions:\|contents:" .github/workflows 2>/dev/null || true
Repository: Saturate/AKJIO
Length of output: 1385
🌐 Web query:
GitHub App installation access token permissions endpoint content read-only vs contents read
💡 Result:
In the context of GitHub App permissions, contents:read-only and contents:read represent different access levels for repository data [1][2]. When configuring permissions for a GitHub App, you select the specific access level required for your app's functionality to follow the principle of least privilege [1][3]. 1. Contents (read-only): This level allows the GitHub App to read repository contents, such as files and directory structures, via the API [3][2]. It does not grant the app permission to modify, create, or delete repository files [3]. This is the appropriate setting for apps that only need to analyze or display code without making changes [3]. 2. Contents (read/write): This level allows the GitHub App to perform both read and write operations on repository contents [1][3]. With this permission, the app can create, update, and delete files within the repository [3][4]. When troubleshooting permission issues, the GitHub API provides the X-Accepted-GitHub-Permissions header in responses [2][5]. This header explicitly states the permission level required by the endpoint, such as contents=read, which confirms that read-only access is sufficient for that specific operation [2][5]. If an app attempts to perform a write operation with only read-only access, the request will fail with an insufficient permissions error [2][5]. For GitHub Apps, the success of an API request using an installation access token depends entirely on the permissions granted to the app [1][6]. Unlike user access tokens, where the user's own permissions may also limit access, an installation access token operates based on the pre-configured permissions of the GitHub App installation [1][6].
Citations:
Restrict the minted token to content read access.
repositories only scopes the token to akjio-content; actions/create-github-app-token still inherits the installation’s App permissions by default, while this build token only needs contents read access. Add permission-contents: read so the App/installation permissions and generated token are limited to what is required.
[error] 29-29: missing input "app-id" which is required by action "actions/create-github-app-token@v2". all required inputs are "app-id", "private-key"
(action)
[error] 31-31: input "client-id" is not defined in action "actions/create-github-app-token@v2". available inputs are "app-id", "github-api-url", "owner", "permission-actions", "permission-administration", "permission-checks", "permission-codespaces", "permission-contents", "permission-custom-properties-for-organizations", "permission-dependabot-secrets", "permission-deployments", "permission-email-addresses", "permission-enterprise-custom-properties-for-organizations", "permission-environments", "permission-followers", "permission-git-ssh-keys", "permission-gpg-keys", "permission-interaction-limits", "permission-issues", "permission-members", "permission-metadata", "permission-organization-administration", "permission-organization-announcement-banners", "permission-organization-copilot-seat-management", "permission-organization-custom-org-roles", "permission-organization-custom-properties", "permission-organization-custom-roles", "permission-organization-events", "permission-organization-hooks", "permission-organization-packages", "permission-organization-personal-access-token-requests", "permission-organization-personal-access-tokens", "permission-organization-plan", "permission-organization-projects", "permission-organization-secrets", "permission-organization-self-hosted-runners", "permission-organization-user-blocking", "permission-packages", "permission-pages", "permission-profile", "permission-pull-requests", "permission-repository-custom-properties", "permission-repository-hooks", "permission-repository-projects", "permission-secret-scanning-alerts", "permission-secrets", "permission-security-events", "permission-single-file", "permission-starring", "permission-statuses", "permission-team-discussions", "permission-vulnerability-alerts", "permission-workflows", "private-key", "repositories", "skip-token-revoke"
(action)
[error] 29-29: dangerous use of GitHub App tokens (github-app): app token inherits blanket installation permissions
(github-app)
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci.yml around lines 29 - 34, Add the
actions/create-github-app-token configuration key permission-contents with read
access alongside the existing token inputs, keeping the repository scope
unchanged and limiting the generated token to contents read permission.
Source: Linters/SAST tools
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Content lives in a separate private repo now, cloned during CI and Vercel builds via GitHub App auth (saturate-ci). CI uses actions/create-github-app-token v3, Vercel generates a JWT from the app's private key and exchanges it for an installation token. Draft filtering switched from _drafts/ directory to frontmatter-based draft: true field.
d05f132 to
c086c44
Compare
There was an error while loading. Please reload this page.
c086c44a
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.