Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Exclude workflow YAML from MegaLinter lychee URL checks - #3864

#3864
Open
plengauer with Copilot wants to merge 2 commits into
mainplengauer/Thoth:mainfrom
copilot/plengauer-lychee-flag-false-positiveplengauer/Thoth:copilot/plengauer-lychee-flag-false-positiveCopy head branch name to clipboard
Open

Exclude workflow YAML from MegaLinter lychee URL checks#3864
plengauer with Copilot wants to merge 2 commits into
mainplengauer/Thoth:mainfrom
copilot/plengauer-lychee-flag-false-positiveplengauer/Thoth:copilot/plengauer-lychee-flag-false-positiveCopy head branch name to clipboard

Conversation

Copilot AI commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

MegaLinter/lychee was reporting non-actionable link failures from hand-written workflow YAML where URLs are intentionally placeholders, expression fragments, or runtime-only endpoints. This change removes that false-positive class at the source by scoping lychee away from .github/workflows/.

  • Change

    • Added a minimal MegaLinter config file at repository root: .mega-linter.yml.
    • Set lychee exclusion to ignore workflow files under .github/workflows/.
  • Effect

    • Prevents noisy/broken-link findings for workflow-only placeholders (e.g., templated GitHub API URLs, x-access-token remote fragments, localhost OTLP endpoints used only during CI jobs).
    • Keeps workflow validation responsibilities with workflow-focused linters (e.g., actionlint/yamllint) instead of URL crawlers.
# .mega-linter.yml
SPELL_LYCHEE_FILTER_REGEX_EXCLUDE: "\\.github/workflows/"

@plengauer

Copy link
Copy Markdown
Owner

Hello, thanks for contributing for the first time!

Copilot AI changed the title [WIP] Fix false positive flags in hand-written workflow YAML Exclude workflow YAML from MegaLinter lychee URL checks Jul 25, 2026
Copilot AI requested a review from plengauer July 25, 2026 23:34
@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
❌ COPYPASTE jscpd yes 70 no 1.34s
✅ REPOSITORY betterleaks yes no no 4.57s
✅ REPOSITORY checkov yes no no 30.39s
❌ REPOSITORY devskim yes 2027 185 127.64s
✅ REPOSITORY dustilock yes no no 1.2s
✅ REPOSITORY gitleaks yes no no 67.01s
✅ REPOSITORY git_diff yes no no 0.18s
❌ REPOSITORY grype yes 2 no 114.77s
❌ REPOSITORY kingfisher yes 1 4 19.63s
❌ REPOSITORY osv-scanner yes 2 no 1.26s
✅ REPOSITORY secretlint yes no no 3.94s
✅ REPOSITORY syft yes no no 8.38s
❌ REPOSITORY trivy yes 11 6 13.4s
✅ REPOSITORY trivy-sbom yes no no 1.0s
✅ REPOSITORY trufflehog yes no no 4.82s
✅ SPELL cspell 2 0 0 3.6s
✅ SPELL lychee 1 0 0 0.1s
✅ YAML prettier 1 0 0 0.61s
✅ YAML v8r 1 0 0 6.33s
✅ YAML yamllint 1 0 0 1.48s

Detailed Issues

❌ REPOSITORY / devskim - 2027 errors

No output available

❌ REPOSITORY / grype - 2 errors

No output available

❌ COPYPASTE / jscpd - 70 errors
rl.sh [207:67 - 216:29]
Clone found (bash)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.curl.sh [399:7 - 404:9] (6 lines, 92 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.curl.sh [437:9 - 442:11]
Clone found (c)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.http/agent.injection.http_header.c [21:147 - 28:24] (8 lines, 57 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.http/agent.injection.http_header.c [45:72 - 52:24]
Clone found (c)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.http/agent.injection.http_header.c [86:36 - 93:22] (8 lines, 75 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.http/agent.injection.http_header.c [246:33 - 253:22]
Clone found (c)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.http/agent.injection.http_header.c [175:77 - 181:25] (7 lines, 52 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.http/agent.injection.http_header.c [192:106 - 198:25]
Clone found (c)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.http/agent.injection.http_header.c [175:77 - 181:25] (7 lines, 52 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.http/agent.injection.http_header.c [209:102 - 215:25]
Clone found (java)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.java/GradleHttpPropagationAgent.java [13:75 - 18:7] (6 lines, 75 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.java/RootContextAgent.java [3:73 - 9:7]
Clone found (javascript)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.node/deep.instrument.js [15:1 - 36:2] (22 lines, 141 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.node/deep.link.js [11:1 - 32:2]
Clone found (bash)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.wget.sh [97:114 - 104:29] (8 lines, 56 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.wget.sh [181:72 - 188:29]
Clone found (bash)
 - src/usr/share/opentelemetry_shell/agent.instrumentation.wget.sh [118:9 - 124:90] (7 lines, 57 tokens)
   src/usr/share/opentelemetry_shell/agent.instrumentation.wget.sh [129:7 - 135:88]
Clone found (bash)
 - src/usr/share/opentelemetry_shell/agent.sh [343:19 - 356:2] (14 lines, 59 tokens)
   src/usr/share/opentelemetry_shell/agent.sh [362:27 - 375:2]
Clone found (python)
 - src/usr/share/opentelemetry_shell/sdk.py [65:9 - 87:42] (23 lines, 141 tokens)
   src/usr/share/opentelemetry_shell/sdk.py [105:9 - 128:37]
Clone found (bash)
 - tests/assert.sh [37:45 - 54:8] (18 lines, 79 tokens)
   tests/assert.sh [54:44 - 71:8]
Clone found (bash)
 - tests/auto/test_auto_curl.sh [7:45 - 17:14] (11 lines, 97 tokens)
   tests/auto/test_auto_wget.sh [9:50 - 18:14]
Clone found (bash)
 - tests/auto/test_auto_curl.sh [12:1 - 17:14] (6 lines, 62 tokens)
   tests/auto/test_auto_curl.sh [66:1 - 71:14]
Clone found (bash)
 - tests/auto/test_auto_curl.sh [17:43 - 22:89] (6 lines, 60 tokens)
   tests/auto/test_auto_curl.sh [71:41 - 76:89]
Clone found (bash)
 - tests/auto/test_auto_curl.sh [19:19 - 25:84] (7 lines, 80 tokens)
   tests/auto/test_auto_curl.sh [39:29 - 45:84]
Clone found (bash)
 - tests/auto/test_auto_curl.sh [30:61 - 35:14] (6 lines, 54 tokens)
   tests/auto/test_auto_curl.sh [64:68 - 69:14]
Clone found (bash)
 - tests/auto/test_auto_curl.sh [32:1 - 37:14] (6 lines, 62 tokens)
   tests/auto/test_auto_wget.sh [32:1 - 37:14]
Clone found (bash)
 - tests/auto/test_auto_curl.sh [49:1 - 54:14] (6 lines, 62 tokens)
   tests/auto/test_auto_wget.sh [49:1 - 54:14]
Clone found (bash)
 - tests/auto/test_auto_injection_node.sh [67:1 - 79:26] (13 lines, 65 tokens)
   tests/auto/test_auto_injection_node.sh [98:1 - 110:26]
Clone found (bash)
 - tests/auto/test_auto_injection_node.sh [80:1 - 98:6] (19 lines, 117 tokens)
   tests/auto/test_auto_injection_node.sh [112:1 - 130:6]
Clone found (bash)
 - tests/auto/test_auto_injection_node.sh [109:9 - 115:14] (7 lines, 54 tokens)
   tests/auto/test_auto_injection_node.sh [135:2 - 141:14]
Clone found (bash)
 - tests/auto/test_auto_netcat.sh [98:19 - 104:193] (7 lines, 69 tokens)
   tests/auto/test_auto_netcat.sh [109:33 - 115:193]
Clone found (bash)
 - tests/auto/test_auto_wget.sh [20:19 - 28:37] (9 lines, 92 tokens)
   tests/auto/test_auto_wget.sh [39:29 - 48:20]
┌────────────┬────────────────┬─────────────┬──────────────┬──────────────┬──────────────────┬───────────────────┐
│ Format     │ Files analyzed │ Total lines │ Total tokens │ Clones found │ Duplicated lines │ Duplicated tokens │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ bash       │ 108            │ 8288        │ 58528        │ 58           │ 605 (7.30%)      │ 5907 (10.09%)     │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ c          │ 2              │ 334         │ 2652         │ 4            │ 26 (7.78%)       │ 236 (8.90%)       │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ java       │ 6              │ 313         │ 2886         │ 2            │ 10 (3.19%)       │ 142 (4.92%)       │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ javascript │ 9              │ 296         │ 2690         │ 5            │ 69 (23.31%)      │ 632 (23.49%)      │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ kotlin     │ 2              │ 57          │ 703          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ python     │ 3              │ 733         │ 5265         │ 1            │ 22 (3.00%)       │ 141 (2.68%)       │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ txt        │ 2              │ 16          │ 134          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ Total:     │ 132            │ 10037       │ 72858        │ 70           │ 732 (7.29%)      │ 7058 (9.69%)      │
└────────────┴────────────────┴─────────────┴──────────────┴──────────────┴──────────────────┴───────────────────┘
Found 70 clones.
HTML report saved to megalinter-reports/copy-paste/jscpd-report.html
ERROR: jscpd found too many duplicates (7.3%) over threshold (0.0%)
time: 296.937ms

(Truncated to last 6666 characters out of 14586)
❌ REPOSITORY / kingfisher - 1 error

No output available

❌ REPOSITORY / osv-scanner - 2 errors
Scanning dir .
Starting filesystem walk for root: /
Scanned src/opt/opentelemetry_shell/requirements.txt file and found 8 packages
Scanned src/usr/share/opentelemetry_shell/agent.instrumentation.java/pom.xml file and found 2 packages
Scanned src/usr/share/opentelemetry_shell/agent.instrumentation.python/requirements.txt file and found 8 packages
Scanned src/usr/share/opentelemetry_shell/agent.instrumentation.python/instrumentation_roots_requirements.txt file and found 2 packages
Scanned actions/instrument/job/package-lock.json file and found 157 packages
End status: 92 dirs visited, 533 inodes visited, 5 Extract calls, 16.273096ms elapsed, 16.273226ms wall time
Warning: enricher transitivedependency/pomxml may be risky when run on untrusted artifacts. Please ensure you trust the source code and artifacts.
failed resolution for src/usr/share/opentelemetry_shell/agent.instrumentation.java/pom.xml: failed resolving {Maven:dummy:dummy[Concrete:0] {}}: rpc error: code = Unavailable desc = service unavailable
failed resolution for src/usr/share/opentelemetry_shell/agent.instrumentation.python/instrumentation_roots_requirements.txt: rpc error: code = Unavailable desc = service unavailable
failed resolution for src/opt/opentelemetry_shell/requirements.txt: rpc error: code = Unavailable desc = service unavailable
failed resolution for src/usr/share/opentelemetry_shell/agent.instrumentation.python/requirements.txt: rpc error: code = Unavailable desc = service unavailable
Error during extraction: (extracting as transitivedependency/pomxml) failed resolution for src/usr/share/opentelemetry_shell/agent.instrumentation.java/pom.xml: failed resolving {Maven:dummy:dummy[Concrete:0] {}}: rpc error: code = Unavailable desc = service unavailable
Error during extraction: (extracting as transitivedependency/requirements) failed resolution for src/usr/share/opentelemetry_shell/agent.instrumentation.python/instrumentation_roots_requirements.txt: rpc error: code = Unavailable desc = service unavailable
failed resolution for src/opt/opentelemetry_shell/requirements.txt: rpc error: code = Unavailable desc = service unavailable
failed resolution for src/usr/share/opentelemetry_shell/agent.instrumentation.python/requirements.txt: rpc error: code = Unavailable desc = service unavailable

Total 2 packages affected by 2 known vulnerabilities (0 Critical, 2 High, 0 Medium, 0 Low, 0 Unknown) from 1 ecosystem.
2 vulnerabilities can be fixed.

+-------------------------------------+------+-----------+-----------------+---------+---------------+------------------------------------------+
| OSV URL                             | CVSS | ECOSYSTEM | PACKAGE         | VERSION | FIXED VERSION | SOURCE                                   |
+-------------------------------------+------+-----------+-----------------+---------+---------------+------------------------------------------+
| https://osv.dev/GHSA-mh99-v99m-4gvg | 7.5  | npm       | brace-expansion | 1.1.16  | 5.0.8         | actions/instrument/job/package-lock.json |
| https://osv.dev/GHSA-mh99-v99m-4gvg | 7.5  | npm       | brace-expansion | 2.1.2   | 5.0.8         | actions/instrument/job/package-lock.json |
+-------------------------------------+------+-----------+-----------------+---------+---------------+------------------------------------------+


[REPOSITORY_OSV_SCANNER_ERROR_SERVICE_UNAVAILABLE] osv-scanner could not reach the deps.dev / OSV transitive-dependency resolution service (gRPC "service unavailable").
This is a transient remote service issue, not a vulnerability finding.
Workarounds:
  - Retry the run later.
  - Temporarily mark the linter as non-blocking by adding to your .mega-linter.yml:
      DISABLE_ERRORS_LINTERS:
        - REPOSITORY_OSV_SCANNER
❌ REPOSITORY / trivy - 11 errors

No output available

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@plengauer
plengauer marked this pull request as ready for review July 26, 2026 07:04
@plengauer
plengauer requested a review from moflwi as a code owner July 26, 2026 07:04
Copilot AI review requested due to automatic review settings July 26, 2026 07:04
@plengauer
plengauer enabled auto-merge (squash) July 26, 2026 07:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds a MegaLinter configuration to stop Lychee (URL checking) from scanning GitHub Actions workflow files, reducing false-positive link failures from placeholders and runtime-only endpoints.

Changes:

  • Introduced a repository-level .mega-linter.yml configuration file.
  • Configured Lychee to exclude .github/workflows/ from URL checks.

Comment thread .mega-linter.yml
Comment thread .mega-linter.yml
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.

[MegaLinter][false positive] lychee flags template/placeholder URLs in hand-written workflow YAML

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.