Skip to content

chore: polish employer portfolio - #2

Merged
NilhanHub merged 1 commit into
mainfrom
agent/employer-portfolio-polish
Jul 16, 2026
Merged

chore: polish employer portfolio#2
NilhanHub merged 1 commit into
mainfrom
agent/employer-portfolio-polish

Conversation

@NilhanHub

@NilhanHub NilhanHub commented Jul 16, 2026

Copy link
Copy Markdown
Owner

What changed

  • adds a reproducible 1280x640 project preview and explicit evaluation path
  • adds security reporting, contribution, licensing, and asset-rights guidance
  • adds a portfolio integrity workflow with documentation and changed-history secret gates
  • preserves the project's honest maturity and runtime interfaces

Verification

  • full-history redacted Gitleaks scan
  • Git diff and preview-dimension validation
  • existing project checks where available

Risk and rollback

Documentation, repository policy, and CI only unless the diff explicitly contains a verified tooling repair. Revert this PR to roll back.

Summary by CodeRabbit

  • Documentation

    • Added contribution guidelines covering focused changes, testing, verification, and pull request expectations.
    • Added licensing and reuse guidance for project source code, third-party materials, datasets, fonts, logos, and other assets.
    • Added a security disclosure policy with private reporting instructions and responsible disclosure guidance.
  • Chores

    • Added automated repository integrity checks for required assets, documentation, image validity, and accidentally committed secrets.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds repository governance documents and a GitHub Actions workflow that validates required documentation and image metadata while scanning repository history for secrets.

Changes

Repository governance and integrity

Layer / File(s) Summary
Repository policy documents
CONTRIBUTING.md, LICENSE, RIGHTS.md, SECURITY.md
Defines contribution steps, MIT licensing terms, asset reuse restrictions, third-party license handling, and private vulnerability reporting requirements.
Portfolio integrity workflow
.github/workflows/portfolio-integrity.yml
Runs on pull requests and pushes to main or master, verifies required files and docs/social-preview.png, validates PNG dimensions of 1280×640, and scans git history with Gitleaks.

Estimated code review effort: 2 (Simple) | ~15 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s main theme: broad portfolio cleanup across docs, policy, and CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/employer-portfolio-polish

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
.github/workflows/portfolio-integrity.yml (1)

17-17: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin third-party actions to immutable SHAs.

Both action references use mutable major tags. Pin reviewed full-length commit SHAs so upstream tag changes cannot silently alter code executed with GITHUB_TOKEN; GitHub supports repository-level enforcement of SHA pinning. (docs.github.com)

Also applies to: 37-37

🤖 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 @.github/workflows/portfolio-integrity.yml at line 17, Update both
third-party action references in the workflow, including the actions at the
checkout and second referenced lines, to reviewed full-length immutable commit
SHAs instead of mutable major-version tags. Preserve each action’s current
version and behavior while pinning the exact commits.
🤖 Prompt for all review comments with 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.

Inline comments:
In @.github/workflows/portfolio-integrity.yml:
- Around line 36-39: Update the “Scan changed history for secrets” workflow step
to use gitleaks/gitleaks-action@v3 instead of `@v2`, preserving its existing
GITHUB_TOKEN configuration.
- Around line 16-19: Add persist-credentials: false to the with configuration of
the “Checkout full history” actions/checkout@v4 step, while preserving
fetch-depth: 0 and the existing checkout behavior.
- Around line 8-10: Update the portfolio-integrity workflow to prevent Gitleaks
from attempting PR comments while retaining read-only permissions: set the
Gitleaks configuration key GITLEAKS_ENABLE_COMMENTS to 'false' in the workflow
environment or relevant scan step, and keep pull-requests permission at read.
- Around line 3-6: Move the portfolio integrity check out of the
pull-request-triggered workflow and into a workflow controlled by the trusted
default branch, or enforce it through the repository’s required workflow/ruleset
configuration. Ensure pull requests cannot modify the workflow and bypass the
required integrity gate, while preserving execution for changes targeting the
default branch.

---

Nitpick comments:
In @.github/workflows/portfolio-integrity.yml:
- Line 17: Update both third-party action references in the workflow, including
the actions at the checkout and second referenced lines, to reviewed full-length
immutable commit SHAs instead of mutable major-version tags. Preserve each
action’s current version and behavior while pinning the exact commits.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f1a7262b-03b0-4e89-8966-fef18294118f

📥 Commits

Reviewing files that changed from the base of the PR and between 3c51b80 and 9a00749.

⛔ Files ignored due to path filters (2)
  • docs/social-preview.png is excluded by !**/*.png
  • docs/social-preview.svg is excluded by !**/*.svg
📒 Files selected for processing (5)
  • .github/workflows/portfolio-integrity.yml
  • CONTRIBUTING.md
  • LICENSE
  • RIGHTS.md
  • SECURITY.md

Comment on lines +3 to +6
on:
pull_request:
push:
branches: [main, master]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow file =="
git ls-files .github/workflows/portfolio-integrity.yml
echo

echo "== numbered contents =="
cat -n .github/workflows/portfolio-integrity.yml
echo

echo "== nearby workflow files =="
git ls-files .github/workflows

Repository: NilhanHub/quietcut

Length of output: 1641


🌐 Web query:

GitHub Actions pull_request workflow uses workflow file from base branch or head branch documentation

💡 Result:

In GitHub Actions, the workflow file used for pull_request and pull_request_target events depends on the specific event type [1]: 1. pull_request: This event runs the workflow file as it exists in the pull request's merge commit [1]. Consequently, if you modify a workflow file in your feature branch (the head branch), the version of the workflow in that branch is the one that will execute [1]. 2. pull_request_target: As of November 2025, this event always uses the workflow file from the repository's default branch [2]. This change was implemented to ensure that security-sensitive workflows are not bypassed by outdated or vulnerable workflow definitions that might exist on non-default branches [2]. In summary, pull_request uses the workflow definition from the PR's merge commit (effectively the head branch) [1], while pull_request_target strictly uses the definition from the repository's default branch [2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workflow file and any references to gitleaks/checkout behavior.
python3 - <<'PY'
from pathlib import Path
p = Path('.github/workflows/portfolio-integrity.yml')
print(p.read_text())
PY

Repository: NilhanHub/quietcut

Length of output: 1211


🌐 Web query:

site:docs.github.com Actions pull_request workflow file head branch base branch pull_request_target workflow file used

💡 Result:

The primary difference between the pull_request and pull_request_target events in GitHub Actions lies in the context in which the workflow runs and the security implications involved [1]. 1. Context and Execution: The pull_request event runs in the context of the merge commit between the base and head branches [1]. This ensures that the workflow tests the exact code that would be merged into the target branch [1]. In contrast, the pull_request_target event runs in the context of the base branch (the target branch) [1]. It does not checkout the pull request's head branch by default, and it executes using the workflow file defined in the base branch [1]. 2. Security: The pull_request_target event is specifically designed to allow workflows to interact safely with pull requests from forks [1]. Because it runs against the base repository's workflow file, it prevents the execution of arbitrary or malicious code that might be present in a user's head branch (e.g., a modified workflow file in a fork) [1]. 3. Workflow File Usage: - For pull_request: The workflow file is taken from the pull request's head branch. - For pull_request_target: The workflow file is taken from the base branch (the branch the pull request is targeting). Because of this, pull_request_target is ideal for tasks like labeling pull requests or posting comments, but it should be used with extreme caution if you intend to check out the head branch to build or run code, as doing so can negate the security protections of the event [1]. If you need to access the code from the head branch in a pull_request_target workflow, you must explicitly use actions like actions/checkout with the ref parameter set to the pull request head to retrieve that code, while remaining aware that the checked-out code is untrusted [1].

Citations:


Keep this check on a default-branch-controlled workflow.
A PR can change this workflow file and keep the required check green while skipping the gate. Run it from a trusted base-branch workflow or required workflow/ruleset instead.

🤖 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 @.github/workflows/portfolio-integrity.yml around lines 3 - 6, Move the
portfolio integrity check out of the pull-request-triggered workflow and into a
workflow controlled by the trusted default branch, or enforce it through the
repository’s required workflow/ruleset configuration. Ensure pull requests
cannot modify the workflow and bypass the required integrity gate, while
preserving execution for changes targeting the default branch.

Comment on lines +8 to +10
permissions:
contents: read
pull-requests: read

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Workflow file\n'
sed -n '1,220p' .github/workflows/portfolio-integrity.yml

printf '\n## Search repo for gitleaks settings\n'
rg -n "GITLEAKS_ENABLE_COMMENTS|gitleaks" .github/workflows . || true

Repository: NilhanHub/quietcut

Length of output: 1353


🌐 Web query:

gitleaks-action GITLEAKS_ENABLE_COMMENTS default pull requests write permissions comments by default

💡 Result:

The Gitleaks-Action configuration option GITLEAKS_ENABLE_COMMENTS is enabled by default (set to true), meaning the action will attempt to post comments on pull requests whenever it detects secrets [1][2][3]. Although the feature is enabled by default, it will not successfully post comments unless the GitHub Actions job is granted the appropriate permissions [4][5]. Because GitHub Actions workflows require explicit permissions to interact with pull requests, you must configure the job with pull-requests: write permission in your workflow YAML file for the commenting feature to function [4][5]. If this permission is missing or restricted, the action may encounter 403 errors when attempting to comment [5]. To ensure the action can post comments, include the following in your workflow job definition [4]: jobs: gitleaks: runs-on: ubuntu-latest permissions: contents: read pull-requests: write steps: - uses: actions/checkout@v4 - uses: gitleaks/gitleaks-action@v2 with: GITLEAKS_ENABLE_COMMENTS: true # Default behavior If you do not want the action to comment on your pull requests, you must explicitly set GITLEAKS_ENABLE_COMMENTS: false in your configuration [1][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the workflow context around the gitleaks step only.
nl -ba .github/workflows/portfolio-integrity.yml | sed -n '1,220p' | sed -n '/gitleaks/,+40p'

# Search for any existing comment toggle or token permissions in workflows.
rg -n "GITLEAKS_ENABLE_COMMENTS|pull-requests:\s*write|issues:\s*write|gitleaks" .github/workflows

Repository: NilhanHub/quietcut

Length of output: 196


🌐 Web query:

site:github.com gitleaks-action GITLEAKS_ENABLE_COMMENTS pull-requests: write read-only permissions

💡 Result:

When using gitleaks-action with GITLEAKS_ENABLE_COMMENTS set to true (which is the default), the action requires write permissions for pull requests to successfully post comments on the PR [1][2][3]. If your workflow encounters a "Resource not accessible by integration" error, you must explicitly grant the necessary permissions in your GitHub Actions workflow file [4][5]. The following permissions configuration is typically required [4]: permissions: contents: read pull-requests: write While some users have reported that only read permissions for pull-requests were necessary in specific configurations [5], write permissions are the standard requirement for the GITHUB_TOKEN to interact with the GitHub API to create review comments on pull requests [5][2]. If you are using the security-events feature to upload SARIF results, you may also need to include security-events: write [4].

Citations:


Disable Gitleaks PR comments or grant write access. Gitleaks comments on PR findings by default, but this workflow only grants pull-requests: read, so comment creation will fail. Set GITLEAKS_ENABLE_COMMENTS: 'false' to keep the scan read-only, or switch to pull-requests: write if PR comments are intended.

🤖 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 @.github/workflows/portfolio-integrity.yml around lines 8 - 10, Update the
portfolio-integrity workflow to prevent Gitleaks from attempting PR comments
while retaining read-only permissions: set the Gitleaks configuration key
GITLEAKS_ENABLE_COMMENTS to 'false' in the workflow environment or relevant scan
step, and keep pull-requests permission at read.

Comment on lines +16 to +19
- name: Checkout full history
uses: actions/checkout@v4
with:
fetch-depth: 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files .github/workflows/portfolio-integrity.yml
echo '---'
cat -n .github/workflows/portfolio-integrity.yml

Repository: NilhanHub/quietcut

Length of output: 1529


🌐 Web query:

actions/checkout v4 persist-credentials default local Git config later steps third-party actions documentation

💡 Result:

In actions/checkout v4, the persist-credentials input defaults to true [1][2]. When enabled, this setting configures the local Git authentication (using the GITHUB_TOKEN or a provided SSH key) within the local Git configuration [1][3][4]. This allows subsequent steps in your workflow to execute authenticated Git commands (such as git push or fetching private submodules) without needing to manually re-authenticate [1][3][4]. The token is managed as follows: - Mechanism: It is persisted in the local Git configuration (typically via an http.https://github.com/.extraheader basic-auth value in.git/config) [4]. - Cleanup: The credential is removed automatically during the post-job cleanup phase of the action [1][3]. - Security Note: Because the credential exists in the Git configuration during the job's execution, if a later step in your workflow uploads the repository directory (including the.git/ folder) as an artifact, the credential may be included in that artifact [4]. - Opt-out: You can disable this behavior by setting persist-credentials: false [1][3]. This is recommended if your workflow does not perform any authenticated Git operations after the checkout step, as it reduces the potential security surface area [4].

Citations:


Disable persisted checkout credentials. actions/checkout stores the token in local Git config by default, and this job doesn’t need authenticated Git operations after checkout. Set persist-credentials: false to reduce exposure to later steps and third-party actions.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 16-19: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 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 @.github/workflows/portfolio-integrity.yml around lines 16 - 19, Add
persist-credentials: false to the with configuration of the “Checkout full
history” actions/checkout@v4 step, while preserving fetch-depth: 0 and the
existing checkout behavior.

Source: Linters/SAST tools

Comment on lines +36 to +39
- name: Scan changed history for secrets
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

gitleaks/gitleaks-action v2 node 20 insecure opt-out June 2 2026 September 16 2026 v3 node 24

💡 Result:

The gitleaks-action has transitioned to v3 to support the Node 24 runtime [1][2]. This update was necessitated by GitHub's deprecation of the Node 20 runtime for GitHub Actions [1][3]. The deprecation timeline and requirements are as follows: - June 2, 2026: GitHub changed the default runner to Node 24 [1][2]. Workflows continuing to use gitleaks-action@v2 (which runs on Node 20) require the environment variable ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true to execute [1][4]. Without this opt-out, these workflows will fail [1][2]. - September 16, 2026: Node 20 will be removed from GitHub-hosted runners entirely [1][2]. At this point, gitleaks-action@v2 will cease to function regardless of whether the opt-out flag is set [1][3]. Users are advised to migrate to gitleaks-action@v3, which utilizes Node 24 and requires GitHub Actions runner version 2.327.1 or later [1][2]. No changes to inputs, outputs, or behavior are required for this migration, other than updating the workflow file reference from @v2 to @v3 [1][2].

Citations:


Upgrade Gitleaks to v3. gitleaks/gitleaks-action@v2 runs on Node 20 and will require the insecure opt-out after June 2, 2026; it stops working on GitHub-hosted runners after September 16, 2026. Switch this workflow to @v3.

🤖 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 @.github/workflows/portfolio-integrity.yml around lines 36 - 39, Update the
“Scan changed history for secrets” workflow step to use
gitleaks/gitleaks-action@v3 instead of `@v2`, preserving its existing GITHUB_TOKEN
configuration.

@NilhanHub
NilhanHub merged commit 0087604 into main Jul 16, 2026
2 checks passed
@NilhanHub
NilhanHub deleted the agent/employer-portfolio-polish branch July 16, 2026 10:02
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.

2 participants