oxsecurity / megalinter

🦙 MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
https://megalinter.io
GNU Affero General Public License v3.0
1.8k stars 215 forks source link

[Bug] Github Actions - 404 Network Errors Encountered with MegaLinter URLs #3687

Closed byangtri closed 6 days ago

byangtri commented 6 days ago

Describe the bug Encountered 404 network errors related to URLs when running the MegaLinter action in Github Actions workflow

To Reproduce Steps to reproduce the behavior:

  1. Go to https://github.com/oxsecurity/megalinter?tab=readme-ov-file#github-action
  2. Create a new file in your repository called .github/workflows/mega-linter.yml
  3. Copy the example workflow from below into that new file, no extra configuration required
  4. Commit that file to a new branch
  5. Open up a pull request and observe the action workingCreate a new file in your repository called .github/workflows/mega-linter.yml

Expected behavior I expected MegaLinter to successfully fetch configuration and flavor information from the URLs provided without encountering a 404 error.

Screenshots

❌ Linted [SPELL] files with [lychee]: Found 3 error(s) - (0.24s) (expand for details)
  - Using [lychee v0.15.1] https://megalinter.io/7.12.0/descriptors/spell_lychee
  - MegaLinter key: [SPELL_LYCHEE]
  - Rules config: identified by [lychee]
  - Number of files analyzed: [2]
  --Error detail:
  ✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found
  ✗ [404] https://megalinter.io/flavors/ | Failed: Network error: Not Found
  ✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found
  📝 Summary
  ---------------------
  🔍 Total............4
  ✅ Successful.......1
  ⏳ Timeouts.........0
  🔀 Redirected.......0
  👻 Excluded.........0
  ❓ Unknown..........0
  🚫 Errors...........3

  Errors in .github/workflows/mega-linter.yml
  ✗ [404] https://megalinter.io/flavors/ | Failed: Network error: Not Found
  ✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found

  Errors in .mega-linter.yml
  ✗ [404] https://megalinter.io/configuration/ | Failed: Network error: Not Found

Additional context MegaLinter version: v7.12.0 Operating system: Github Hosted Runner, Ubuntu 22.04

byangtri commented 6 days ago

Issue is the mega linter workflow comments are pointing to https://megalinter.io/flavors/ and https://megalinter.io/configuration/, we need to update the URL to point to latest

nvuillam commented 6 days ago

@byangtri thanks for reporting :) There is a redirection from those urls... but technically it starts with a 404, that's why lychee declares them as error

We should indeed update them to use https://megalinter.io/latest/flavors/ and https://megalinter.io/latest/configuration/ :)

Would you like to make a PR ? :)

echoix commented 6 days ago

Wasn't there an issue once with some churn happening in between releases, or that older versions didn't point to their version of the docs?