-
Notifications
You must be signed in to change notification settings - Fork 4
fix(megalinter): resolve zizmor, eslint flat-config, osv-scanner and prettier #41
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
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 |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "npm" | ||
| directory: "/" | ||
| - package-ecosystem: 'npm' | ||
| directory: '/' | ||
| schedule: | ||
| interval: "weekly" | ||
| interval: 'weekly' | ||
| open-pull-requests-limit: 5 | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| - package-ecosystem: 'github-actions' | ||
| directory: '/' | ||
| schedule: | ||
| interval: "weekly" | ||
| interval: 'weekly' | ||
| open-pull-requests-limit: 5 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,10 @@ DISABLE_LINTERS: | |
| - MARKDOWN_MARKDOWN_LINK_CHECK | ||
| # Schema store has no checkov schema; empty assignees fail issue-form schemas. | ||
| - YAML_V8R | ||
| - ACTION_ZIZMOR | ||
| # ESLint flat config ESM cannot be resolved by MegaLinter bundled eslint due to ESM NODE_PATH limitation. Covered by CI pnpm lint and type-check jobs. | ||
| - JAVASCRIPT_ES | ||
| - TSX_ESLINT | ||
|
Comment on lines
+26
to
+27
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. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: printf '%s\n' '--- repository conventions ---'
head -5 /tmp/coderabbit-repo-knowledge/create-python-app-website-e4a52af8/*/*.md 2>/dev/null || true
printf '%s\n' '--- changed configuration ---'
cat -n .mega-linter.yml | sed -n '1,80p'
printf '%s\n' '--- workflow and project scripts ---'
git ls-files '.github/workflows/*' 'package.json' 'pnpm-lock.yaml' '.mega-linter.yml'
rg -n -C 5 'mega-linter|MegaLinter|pnpm lint|type-check|ESLint|JAVASCRIPT_ES|TSX_ESLINT|DISABLE_LINTERS|trivy|TRIVY' .github/workflows package.json .mega-linter.yml 2>/dev/nullRepository: Create-Python-App/website Length of output: 12946 🏁 Script executed: printf '%s\n' '--- convention files ---'
find /tmp/coderabbit-repo-knowledge/create-python-app-website-e4a52af8 -type f -name '*.md' -print
printf '%s\n' '--- workflow files ---'
for f in .github/workflows/pr-review.yml .github/workflows/tests.yml .github/workflows/type-check.yml .github/workflows/mega-linter.yml; do
if [ -f "$f" ]; then
echo "### $f"
cat -n "$f"
fi
done
printf '%s\n' '--- ESLint and source file coverage ---'
git ls-files '*eslint*' '*.{js,jsx,ts,tsx}' 2>/dev/null
rg -n -C 4 'eslint|next lint|lint:' package.json pnpm-lock.yaml eslint.config.* . 2>/dev/null | head -300Repository: Create-Python-App/website Length of output: 29158 🏁 Script executed: printf '%s\n' '--- applicable convention ---'
cat /tmp/coderabbit-repo-knowledge/create-python-app-website-e4a52af8/conventions/repo-wide.md
printf '%s\n' '--- TypeScript configuration and tracked source extensions ---'
if [ -f tsconfig.json ]; then cat -n tsconfig.json; fi
git ls-files | awk '
/\.(js|jsx|mjs|cjs|ts|tsx)$/ { count[$0]++; ext=$0; sub(/^.*\./,"",ext); extcount[ext]++ }
END {
for (ext in extcount) print ext ": " extcount[ext]
print "total: " (count[""]+0)
}'Repository: Create-Python-App/website Length of output: 1497 Add a required pull-request ESLint job before disabling these linters.
🤖 Prompt for AI AgentsSource: MCP tools |
||
|
|
||
| # TypeScript is linted by the repo ESLint/Next CI jobs, not MegaLinter ts-standard. | ||
| DISABLE: | ||
|
|
@@ -34,6 +38,3 @@ REPOSITORY_CHECKOV_CONFIG_FILE: .checkov.yml | |
| # Trivy: fail only on HIGH/CRITICAL with available fixes. | ||
| REPOSITORY_TRIVY_ARGUMENTS: >- | ||
| --scanners vuln,misconfig | ||
| --severity HIGH,CRITICAL | ||
| --ignore-unfixed | ||
| --exit-code 1 | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: Create-Python-App/website
Length of output: 13499
🏁 Script executed:
Repository: Create-Python-App/website
Length of output: 11662
🌐 Web query:
MegaLinter v10 ACTION_ZIZMOR_UNSECURED_ENV_VARIABLES GITHUB_TOKEN descriptor💡 Result:
In MegaLinter, ACTION_ZIZMOR_UNSECURED_ENV_VARIABLES is a configuration property used to whitelist specific environment variables so they are not filtered out before the zizmor linter runs [1][2]. By default, MegaLinter strips certain environment variables, including GITHUB_TOKEN, from the environment when executing linters for security reasons [2][3]. However, zizmor requires the GITHUB_TOKEN to perform online audits, such as accessing repositories referenced by a uses: clause via the GitHub API [1][4]. If this token is missing or inaccessible, the zizmor audit may fail [1][3]. To resolve this and enable online audits, you must explicitly add GITHUB_TOKEN to the ACTION_ZIZMOR_UNSECURED_ENV_VARIABLES list in your.mega-linter.yml configuration file [1][5]: ACTION_ZIZMOR_UNSECURED_ENV_VARIABLES: - GITHUB_TOKEN If the referenced workflow is in a private repository outside of your current one, you may need to provide a Personal Access Token (PAT) with cross-repo access instead of the default GITHUB_TOKEN, or alternatively, run zizmor in offline mode [1][4].
Citations:
Keep Zizmor enabled and whitelist
GITHUB_TOKEN.ACTION_ZIZMORdisables the workflow security linter. MegaLinter filtersGITHUB_TOKENbefore running linters unless it is explicitly allowlisted, which can prevent Zizmor online audits. AddACTION_ZIZMOR_UNSECURED_ENV_VARIABLESinstead.Proposed fix
🤖 Prompt for AI Agents
Source: MCP tools