-
Notifications
You must be signed in to change notification settings - Fork 0
fix: add GUARDRAIL + triggers to SKILL.md #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8d2180b
080c8a7
424ceea
7484121
64648d4
ac0e82b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| github: Nadav011 | ||
| custom: ["https://mcpize.com/mcp/rtl-fixer"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Security Scan | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: security-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| semgrep: | ||
| runs-on: [self-hosted, linux, x64, pop-os] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Semgrep SAST | ||
| run: | | ||
| pip3 install --user semgrep 2>/dev/null || true | ||
| semgrep scan . --config=auto --error --severity ERROR | ||
|
|
||
| trivy: | ||
| runs-on: [self-hosted, linux, x64, pop-os] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Trivy vulnerability scan | ||
| run: trivy fs . --severity HIGH,CRITICAL --exit-code 1 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,174 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: RTL Check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "**/*.tsx" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "**/*.jsx" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "**/*.css" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "**/*.vue" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rtl-lint: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: RTL Logical Properties Check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install ripgrep | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sudo apt-get update -qq | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y ripgrep | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Scan for physical direction classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: rtl-scan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Pattern: physical direction classes that must be replaced with logical equivalents | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Suppression: any line containing "// rtl-ok" is skipped | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Classes checked: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ml-{n} mr-{n} pl-{n} pr-{n} — physical margin/padding | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # text-left text-right — physical text alignment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # border-l- border-r- — physical border sides | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # rounded-tl rounded-tr — physical border radius (corners) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # rounded-bl rounded-br | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # float-left float-right — physical float | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # left-{n} right-{n} — physical inset positioning (when directional) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PATTERN='\bml-[0-9a-z\[]|\bmr-[0-9a-z\[]|\bpl-[0-9a-z\[]|\bpr-[0-9a-z\[]|text-left\b|text-right\b|border-l-|border-r-|\brounded-tl\b|\brounded-tr\b|\brounded-bl\b|\brounded-br\b|float-left\b|float-right\b' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The checker documentation and replacement hints state that Useful? React with 👍 / 👎.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PATTERN='\bml-[0-9a-z\[]|\bmr-[0-9a-z\[]|\bpl-[0-9a-z\[]|\bpr-[0-9a-z\[]|text-left\b|text-right\b|border-l-|border-r-|\brounded-tl\b|\brounded-tr\b|\brounded-bl\b|\brounded-br\b|float-left\b|float-right\b' | |
| PATTERN='\bml-[0-9a-z\[]|\bmr-[0-9a-z\[]|\bpl-[0-9a-z\[]|\bpr-[0-9a-z\[]|text-left\b|text-right\b|border-l-|border-r-|\brounded-tl\b|\brounded-tr\b|\brounded-bl\b|\brounded-br\b|float-left\b|float-right\b|\bleft-[0-9a-z\[]|\bright-[0-9a-z\[]' |
Copilot
AI
Apr 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PATTERN flags border-l-/border-r- but not the valid Tailwind classes border-l / border-r (no trailing dash), and it doesn’t include other physical direction utilities mentioned elsewhere in the repo docs (e.g., rounded-l-* / rounded-r-*). If the goal is to block all physical direction classes, expand the regex to cover these variants too.
| # ml-{n} mr-{n} pl-{n} pr-{n} — physical margin/padding | |
| # text-left text-right — physical text alignment | |
| # border-l- border-r- — physical border sides | |
| # rounded-tl rounded-tr — physical border radius (corners) | |
| # rounded-bl rounded-br | |
| # float-left float-right — physical float | |
| # left-{n} right-{n} — physical inset positioning (when directional) | |
| PATTERN='\bml-[0-9a-z\[]|\bmr-[0-9a-z\[]|\bpl-[0-9a-z\[]|\bpr-[0-9a-z\[]|text-left\b|text-right\b|border-l-|border-r-|\brounded-tl\b|\brounded-tr\b|\brounded-bl\b|\brounded-br\b|float-left\b|float-right\b' | |
| # ml-{n} mr-{n} pl-{n} pr-{n} — physical margin/padding | |
| # text-left text-right — physical text alignment | |
| # border-l border-r border-l-* border-r-* — physical border sides | |
| # rounded-l rounded-r rounded-l-* rounded-r-* — physical border radius (sides) | |
| # rounded-tl rounded-tr — physical border radius (corners) | |
| # rounded-bl rounded-br | |
| # float-left float-right — physical float | |
| # left-{n} right-{n} — physical inset positioning (when directional) | |
| PATTERN='\bml-[0-9a-z\[]|\bmr-[0-9a-z\[]|\bpl-[0-9a-z\[]|\bpr-[0-9a-z\[]|text-left\b|text-right\b|\bborder-l(?:\b|-)|\bborder-r(?:\b|-)|\brounded-l(?:\b|-)|\brounded-r(?:\b|-)|\brounded-tl\b|\brounded-tr\b|\brounded-bl\b|\brounded-br\b|float-left\b|float-right\b' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scan all changed source paths instead of hardcoded folders
The lint step claims it checks PR changes, but the rg invocation only searches src/ components/ pages/ app/ styles/. In repositories that keep frontend code elsewhere (for example packages/* or apps/*), this produces an empty scan and the workflow reports success even when violating classes were introduced, so the merge gate can silently fail to enforce RTL rules.
Useful? React with 👍 / 👎.
Copilot
AI
Apr 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rg is currently run only against src/ components/ pages/ app/ styles/, but this repository doesn’t have those directories, so the job will always report zero violations. Consider scanning the full repo (with appropriate excludes) or derive the changed file list from git diff and pass those paths to rg.
| # - search only changed files in the PR (fallback: all source files) | |
| # - exclude lines containing "rtl-ok" suppression comment | |
| # - show file, line number, and matching content | |
| VIOLATIONS=$(rg --glob "*.tsx" --glob "*.jsx" --glob "*.css" --glob "*.vue" \ | |
| --line-number \ | |
| --no-heading \ | |
| --color never \ | |
| "$PATTERN" \ | |
| src/ components/ pages/ app/ styles/ 2>/dev/null \ | |
| | grep -v "rtl-ok" \ | |
| | grep -v "//.*rtl-ok" \ | |
| || true) | |
| # - search only changed files in the PR (fallback: all matching files in the repo) | |
| # - exclude lines containing "rtl-ok" suppression comment | |
| # - show file, line number, and matching content | |
| CHANGED_FILES=/tmp/rtl-changed-files.txt | |
| git fetch --no-tags --depth=1 origin "${{ github.base_ref }}" || true | |
| git diff --name-only "origin/${{ github.base_ref }}"...HEAD \ | |
| | grep -E '\.(tsx|jsx|css|vue)$' > "$CHANGED_FILES" || true | |
| if [ -s "$CHANGED_FILES" ]; then | |
| VIOLATIONS=$(xargs -r rg \ | |
| --line-number \ | |
| --no-heading \ | |
| --color never \ | |
| "$PATTERN" < "$CHANGED_FILES" \ | |
| | grep -v "rtl-ok" \ | |
| | grep -v "//.*rtl-ok" \ | |
| || true) | |
| else | |
| VIOLATIONS=$(rg --glob "*.tsx" --glob "*.jsx" --glob "*.css" --glob "*.vue" \ | |
| --glob "!.git" \ | |
| --line-number \ | |
| --no-heading \ | |
| --color never \ | |
| "$PATTERN" \ | |
| . 2>/dev/null \ | |
| | grep -v "rtl-ok" \ | |
| | grep -v "//.*rtl-ok" \ | |
| || true) | |
| fi |
Copilot
AI
Apr 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step creates a new PR comment on every failing run (issues.createComment), which can spam PRs when commits are pushed or workflows are re-run. Consider updating an existing comment (e.g., search for a prior comment marker and edit it) or using a “sticky comment” approach so there’s only one up-to-date RTL-check comment per PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds a top-level
CI/directory even though the repo already has aci/directory. On case-sensitive systems this is two distinct paths, which is easy to confuse and can cause tooling/docs drift. Consider consolidating under the existingci/directory name (or placing the workflow directly under.github/workflows).