Skip to content

Fix trivy failures when the vulnerability database registry rate-limits the run - #8813

Open
nvuillam wants to merge 2 commits into
mainfrom
fix/trivy-db-rate-limit-fallback
Open

nvuillam wants to merge 2 commits into
mainfrom
fix/trivy-db-rate-limit-fallback

Conversation

@nvuillam

Copy link
Copy Markdown
Member

Fixes #8807

Root cause

REPOSITORY_TRIVY ended runs with a confusing fatal error:

ERROR [vulndb] The first run cannot skip downloading DB
FATAL Fatal error run error: init error: DB error: database error: --skip-db-update cannot be specified on the first run

Three problems combined:

  1. Retries had no backoff. The 5 retries all ran within ~20 seconds, so they all landed in the same registry rate limit window and were guaranteed to fail together.
  2. The last-chance fallback was invalid. After the retries, TrivyLinter unconditionally appended --skip-db-update --skip-check-update. trivy refuses this when no database has ever been downloaded (pkg/db/db.go: noRequiredFiles when db/trivy.db or db/metadata.json is missing), turning a rate limit into a fatal error nobody can act on.
  3. The database shipped in the image was never seen. The image downloads the database at build time into /root/.cache/trivy (HOME=/root), but the GitHub Actions runner forces HOME=/github/home in container actions, so trivy resolves its cache to an empty /github/home/.cache/trivy. Every GitHub Actions run is therefore a "first run".

Fix

  • All official mirrors are used. --db-repository / --java-db-repository are set to mirror.gcr.io, ghcr.io and public.ecr.aws, and trivy falls back to the next one on 429/5xx/BLOB_UNKNOWN. trivy's own defaults are only the first two, and setting the flag replaces the defaults, so all three are listed. Skipped when the user set TRIVY_DB_REPOSITORY, passed --db-repository, or defined db.repository in a trivy config file.
  • Retries are spaced with an exponential backoff (10s, 20s, 40s, 60s), so they span more than one rate limit minute. Nothing is waited on the normal path: the backoff only happens between retries.
  • --skip-db-update only when a database exists. The cache directory is resolved from --cache-dir, cache.dir, TRIVY_CACHE_DIR, XDG_CACHE_HOME, HOME, and finally /root/.cache/trivy (the one baked in the image), and db/trivy.db + db/metadata.json must both be present. When the database is found outside the directory trivy would use, --cache-dir is passed so the image database is actually used. When no database exists at all, the run ends with an actionable error instead of the fatal above.
  • Only aborted runs are retried. A rate limit while fetching the optional misconfiguration checks bundle makes trivy fall back to its embedded checks and complete the scan; retrying it wasted attempts (and would now waste minutes). Retries now require a FATAL abort.
  • Guidance is logged once instead of once per attempt (the issue report shows the same block five times).
  • TrivySbomLinter inherits from TrivyLinter, so REPOSITORY_TRIVY_SBOM gets the same behaviour.

New configuration variables, for both REPOSITORY_TRIVY and REPOSITORY_TRIVY_SBOM:

Variable Default
<LINTER>_DB_REPOSITORIES mirror.gcr.io/aquasec/trivy-db:2,ghcr.io/aquasecurity/trivy-db:2,public.ecr.aws/aquasecurity/trivy-db:2
<LINTER>_JAVA_DB_REPOSITORIES mirror.gcr.io/aquasec/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1,public.ecr.aws/aquasecurity/trivy-java-db:1
<LINTER>_DB_RETRY_ATTEMPTS 5
<LINTER>_DB_RETRY_INITIAL_DELAY 10
<LINTER>_DB_RETRY_MAX_DELAY 60

The common_linter_errors guidance was refreshed accordingly (authenticating with GITHUB_TOKEN was removed: per trivy's own troubleshooting page it does not help with the database rate limit, and a stale token returns DENIED, which disables mirror fallback entirely). A new REPOSITORY_TRIVY_ERROR_FIRST_RUN_NO_DB entry covers users who set --skip-db-update themselves.

Verification

  • 22 new unit tests in megalinter/tests/test_megalinter/trivy_linter_test.py cover the mirrors (defaults, user overrides through arguments / env var / config file, disabling), the backoff sequence, cache detection, the offline command, the "no retry on a completed scan" case, and the single guidance message. All pass.
  • The flags were checked against the pinned trivy v0.74.0 binary: --db-repository and --java-db-repository exist on trivy fs, are strings (comma-separated values accepted), and are accepted after the positional target. A run with a 3-mirror list was confirmed to attempt the first repository of the list.

Not verified here

  • The Docker linter tests (repository_trivy_test, repository_trivy_sbom_test) were not run locally; CI covers them.
  • The generated configuration JSON schema entries for the new variables are produced by build.py, which only writes them during a documentation build, so they will land with the next auto-update run.

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

❌MegaLinter analysis: Error

❌ SPELL / cspell - 9 errors
megalinter/descriptors/repository.megalinter-descriptor.yml:1013:35   - Unknown word (aquasec)    -- - mirror.gcr.io/aquasec/trivy-db:2
	 Suggestions: [aquae, aquas, aquatic, aqua, abase]
megalinter/descriptors/repository.megalinter-descriptor.yml:1068:39   - Unknown word (aquasec)    -- value: "mirror.gcr.io/aquasec/trivy-db:2,ghcr.io/aquasecuri
	 Suggestions: [aquae, aquas, aquatic, aqua, abase]
megalinter/descriptors/repository.megalinter-descriptor.yml:1071:39   - Unknown word (aquasec)    -- value: "mirror.gcr.io/aquasec/trivy-java-db:1,ghcr
	 Suggestions: [aquae, aquas, aquatic, aqua, abase]
megalinter/descriptors/repository.megalinter-descriptor.yml:1148:35   - Unknown word (aquasec)    -- - mirror.gcr.io/aquasec/trivy-db:2
	 Suggestions: [aquae, aquas, aquatic, aqua, abase]
megalinter/descriptors/repository.megalinter-descriptor.yml:1184:39   - Unknown word (aquasec)    -- value: "mirror.gcr.io/aquasec/trivy-db:2,ghcr.io/aquasecuri
	 Suggestions: [aquae, aquas, aquatic, aqua, abase]
megalinter/linters/TrivyLinter.py:33:20     - Unknown word (aquasec)    -- "mirror.gcr.io/aquasec/trivy-db:2",
	 Suggestions: [aquae, aquas, aquatic, aqua, abase]
megalinter/linters/TrivyLinter.py:38:20     - Unknown word (aquasec)    -- "mirror.gcr.io/aquasec/trivy-java-db:1",
	 Suggestions: [aquae, aquas, aquatic, aqua, abase]
megalinter/tests/test_megalinter/trivy_linter_test.py:31:13     - Unknown word (misconf)    -- "ERROR [misconf] Falling back to embedded
	 Suggestions: [mascon, misson, mascons, miscode, miscopy]
megalinter/tests/test_megalinter/trivy_linter_test.py:76:38     - Unknown word (aquasec)    -- assertIn("mirror.gcr.io/aquasec/trivy-db:2", DEFAULT
	 Suggestions: [aquae, aquas, aquatic, aqua, abase]
CSpell: Files checked: 870, Issues found: 9 in 3 files.


You can skip this misspellings by defining the following .cspell.json file at the root of your repository
Of course, please correct real typos before :)

{
    "version": "0.2",
    "language": "en",
    "ignorePaths": [
        "**/node_modules/**",
        "**/vscode-extension/**",
        "**/.git/**",
        "**/.pnpm-lock.json",
        ".vscode",
        "package-lock.json",
        "megalinter-reports"
    ],
    "words": [
        "aquasec",
        "misconf"
    ]
}


You can also copy-paste megalinter-reports/.cspell.json at the root of your repository
❌ COPYPASTE / jscpd - 1 error
Using config from megalinter-reports/jscpd-config.json
Clone found (python)
 - megalinter/tests/test_megalinter/trivy_linter_test.py [56:36 - 64:8] (9 lines, 50 tokens)
   megalinter/tests/test_megalinter/trivy_linter_test.py [137:27 - 145:8]
┌────────────┬────────────────┬─────────────┬──────────────┬──────────────┬──────────────────┬───────────────────┐
│ Format     │ Files analyzed │ Total lines │ Total tokens │ Clones found │ Duplicated lines │ Duplicated tokens │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ bash       │ 6              │ 503         │ 1845         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ ini        │ 1              │ 16          │ 68           │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ javascript │ 16             │ 3281        │ 14524        │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ json       │ 5              │ 2112        │ 4390         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ json5      │ 1              │ 229         │ 512          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ markdown   │ 6              │ 470         │ 5847         │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ python     │ 240            │ 18304       │ 84635        │ 1            │ 8 (0.04%)        │ 50 (0.06%)        │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ toml       │ 2              │ 1810        │ 13207        │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ txt        │ 1              │ 41          │ 226          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ yaml       │ 2              │ 8           │ 144          │ 0            │ 0 (0.00%)        │ 0 (0.00%)         │
├────────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ Total:     │ 280            │ 26774       │ 125398       │ 1            │ 8 (0.03%)        │ 50 (0.04%)        │
└────────────┴────────────────┴─────────────┴──────────────┴──────────────┴──────────────────┴───────────────────┘
Found 1 clones.
HTML report saved to megalinter-reports/copy-paste/jscpd-report.html
ERROR: jscpd found too many duplicates (0.0%) over threshold (0.0%)
time: 537.823ms
⚠️ PYTHON / bandit - 197 errors
126	    )
127	    assert os.path.isdir(config.get(request_id, "DEFAULT_WORKSPACE")), (
128	        "DEFAULT_WORKSPACE "
129	        + config.get(request_id, "DEFAULT_WORKSPACE")
130	        + " is not a valid folder"
131	    )
132	

--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b101_assert_used.html
   Location: ./megalinter/utilstest.py:187:4
186	    tmp_report_folder = tempfile.gettempdir() + os.path.sep + str(uuid.uuid4())
187	    assert os.path.isdir(workspace), f"Test folder {workspace} is not existing"
188	    linter_name = linter.linter_name

--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b101_assert_used.html
   Location: ./megalinter/utilstest.py:262:4
261	    tmp_report_folder = tempfile.gettempdir() + os.path.sep + str(uuid.uuid4())
262	    assert os.path.isdir(workspace), f"Test folder {workspace} is not existing"
263	    if os.path.isfile(workspace + os.path.sep + "no_test_failure"):

--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b101_assert_used.html
   Location: ./megalinter/utilstest.py:512:4
511	    )
512	    assert os.path.isdir(workspace), f"Test folder {workspace} is not existing"
513	    expected_file_name = ""

--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b101_assert_used.html
   Location: ./megalinter/utilstest.py:612:4
611	        workspace += os.path.sep + "bad"
612	    assert os.path.isdir(workspace), f"Test folder {workspace} is not existing"
613	    # Call linter

--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b101_assert_used.html
   Location: ./megalinter/utilstest.py:713:4
712	        workspace = workspace + os.path.sep + "fix"
713	    assert os.path.isdir(workspace), f"Test folder {workspace} is not existing"
714	

--------------------------------------------------
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b101_assert_used.html
   Location: ./megalinter/utilstest.py:819:12
818	            ]
819	            assert (len(list(diffs))) > 0, f"No changes in the {file} file"
820	

--------------------------------------------------
>> Issue: [B108:hardcoded_tmp_directory] Probable insecure usage of temp file/directory.
   Severity: Medium   Confidence: Medium
   CWE: CWE-377 (https://cwe.mitre.org/data/definitions/377.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html
   Location: ./server/server.py:81:42
80	    if item.fileUploadId:
81	        uploaded_file_path = os.path.join("/tmp/server-files", item.fileUploadId)
82	        if not os.path.isdir(uploaded_file_path):

--------------------------------------------------
>> Issue: [B108:hardcoded_tmp_directory] Probable insecure usage of temp file/directory.
   Severity: Medium   Confidence: Medium
   CWE: CWE-377 (https://cwe.mitre.org/data/definitions/377.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html
   Location: ./server/server.py:103:38
102	    file_upload_id = "FILE_" + str(uuid1())
103	    uploaded_file_path = os.path.join("/tmp/server-files", file_upload_id)
104	    os.makedirs(uploaded_file_path)

--------------------------------------------------
>> Issue: [B108:hardcoded_tmp_directory] Probable insecure usage of temp file/directory.
   Severity: Medium   Confidence: Medium
   CWE: CWE-377 (https://cwe.mitre.org/data/definitions/377.html)
   More Info: https://bandit.readthedocs.io/en/1.9.4/plugins/b108_hardcoded_tmp_directory.html
   Location: ./server/server_worker.py:102:34
101	        temp_dir = self.create_temp_dir()
102	        upload_dir = os.path.join("/tmp/server-files", file_upload_id)
103	        if os.path.exists(upload_dir):

--------------------------------------------------

Code scanned:
	Total lines of code: 31146
	Total lines skipped (#nosec): 0
	Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
	Total issues (by severity):
		Undefined: 0
		Low: 130
		Medium: 59
		High: 8
	Total issues (by confidence):
		Undefined: 0
		Low: 44
		Medium: 40
		High: 113
Files skipped (0):

(Truncated to last 5714 characters out of 136073)
⚠️ SPELL / lychee - 63 errors
bidden
[403] https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/engine-flow.html (at 498:17) | Rejected status code: 403 Forbidden
[403] https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/get-started.html (at 303:17) | Error (cached)
[403] https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/get-started.html (at 403:17) | Error (cached)
[403] https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/get-started.html (at 74:17) | Rejected status code: 403 Forbidden
[403] https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/rules-flow.html (at 500:23) | Rejected status code: 403 Forbidden

Errors in megalinter/descriptors/shared/biome.megalinter-linter.yml
[404] https://biomejs.dev/linter/rules/ (at 21:19) | Rejected status code: 404 Not Found

Errors in megalinter/descriptors/shared/cppcheck.megalinter-linter.yml
[403] https://cppcheck.sourceforge.io/ (at 3:13) | Rejected status code: 403 Forbidden
[403] https://cppcheck.sourceforge.io/ (at 4:14) | Rejected status code: 403 Forbidden
[403] https://cppcheck.sourceforge.io/manual.html#configuration (at 8:33) | Rejected status code: 403 Forbidden

Errors in megalinter/descriptors/spell.megalinter-descriptor.yml
[404] https://vale.sh/docs/topics/vocab/ (at 190:38) | Rejected status code: 404 Not Found | Followed 2 redirects. Redirects: https://vale.sh/docs/topics/vocab/ --[301]--> https://docs.vale.sh/topics/vocab/ --[302]--> https://docs.vale.sh/topics/vocab
[404] https://vale.sh/docs/vale-cli/structure/ (at 183:95) | Rejected status code: 404 Not Found | Followed 2 redirects. Redirects: https://vale.sh/docs/vale-cli/structure/ --[301]--> https://docs.vale.sh/vale-cli/structure/ --[302]--> https://docs.vale.sh/vale-cli/structure

Errors in megalinter/descriptors/terraform.megalinter-descriptor.yml
[404] https://github.com/gruntwork-io/terragrunt/blob/master/docs/assets/img/favicon/ms-icon-310x310.png (at 124:23) | Rejected status code: 404 Not Found | Followed 1 redirect. Redirects: https://github.com/gruntwork-io/terragrunt/blob/master/docs/assets/img/favicon/ms-icon-310x310.png --[302]--> https://github.com/gruntwork-io/terragrunt/blob/main/docs/assets/img/favicon/ms-icon-310x310.png

Errors in megalinter/descriptors/tsx.megalinter-descriptor.yml
[404] https://eslint-react.xyz/docs/getting-started/installation (at 81:37) | Error (cached)

Errors in megalinter/descriptors/xml.megalinter-descriptor.yml
[406] https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home (at 38:17) | Rejected status code: 406 Not Acceptable

Errors in README.md
[ERROR] https://ampcode.com/ (at 248:1) | HTTP/2 protocol error. Server may not support HTTP/2 properly
[301] https://future-architect.github.io/authors/%E5%AE%AE%E6%B0%B8%E5%B4%87%E5%8F%B2 (at 2036:104) | Rejected status code: 301 Moved Permanently
[TIMEOUT] https://generated.at/ (at 1371:301) | Request timed out
[404] https://github.com/oxsecurity/megalinter/stargazers (at 2202:3) | Rejected status code: 404 Not Found
[404] https://github.com/oxsecurity/megalinter/stargazers/ (at 23:1) | Error (cached)
[403] https://javascript.plainenglish.io/node-js-coding-standard-tools-with-megalinter-on-gitlab-ci-a43b55915811 (at 2019:3) | Rejected status code: 403 Forbidden
[403] https://medium.com/@caodanju/30-seconds-to-setup-megalinter-your-go-to-tool-for-automated-code-quality-and-iac-security-969d90a5a99c (at 2004:3) | Rejected status code: 403 Forbidden
[403] https://medium.com/@RunningMattress (at 2013:255) | Rejected status code: 403 Forbidden
[403] https://medium.com/@RunningMattress/level-up-your-unity-packages-with-ci-cd-9498d2791211 (at 2013:3) | Rejected status code: 403 Forbidden
[403] https://medium.com/@SeasonedDeveloper (at 2000:255) | Rejected status code: 403 Forbidden
[403] https://medium.com/@SeasonedDeveloper/looking-for-the-best-ci-cd-pipeline-linting-tool-try-megalinter-d89c9eba850d (at 2000:3) | Rejected status code: 403 Forbidden
[403] https://medium.com/datamindedbe/integrating-megalinter-to-automate-linting-across-multiple-codebases-a-technical-description-a200bb235b71 (at 2001:3) | Rejected status code: 403 Forbidden
[403] https://nicolas.vuillamy.fr/improve-uniformize-and-secure-your-code-base-with-megalinter-62ebab422c1 (at 2022:3) | Rejected status code: 403 Forbidden
[403] https://nicolas.vuillamy.fr/megalinter-sells-his-soul-and-joins-ox-security-2a91a0027628 (at 2021:3) | Rejected status code: 403 Forbidden
[403] https://nklya.medium.com/ (at 2018:255) | Rejected status code: 403 Forbidden
[403] https://nklya.medium.com/hot-to-linter-basic-things-like-trailing-whitespaces-and-newlines-7b40da8f688d (at 2018:3) | Rejected status code: 403 Forbidden
[403] https://npmjs.org/package/mega-linter-runner (at 1286:1) | Error (cached)
[403] https://npmjs.org/package/mega-linter-runner (at 1287:1) | Error (cached)
[403] https://npmjs.org/package/mega-linter-runner (at 1288:1) | Error (cached)
[403] https://npmjs.org/package/mega-linter-runner (at 21:1) | Error (cached)
[403] https://openai.com/codex/ (at 240:1) | Rejected status code: 403 Forbidden
[403] https://pmd.sourceforge.io/pmd-6.55.0/pmd_userdocs_tools_ci.html (at 2107:3) | Error (cached)
[403] https://www.npmjs.com/package/@downatthebottomofthemolehole/megalinter-mcp-server (at 1978:354) | Rejected status code: 403 Forbidden

Hint: Followed 796 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: Rejected redirectional status codes. This means some redirects were not followed. You might want to increase the limit for `-m`/`--max-redirects`.

(Truncated to last 5714 characters out of 33999)
⚠️ MARKDOWN / markdownlint - 360 errors
dings in the same document [Context: "File.io Reporter"]
docs/reporters/GitHubCommentReporter.md:6 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "GitHub Comment Reporter"]
docs/reporters/GitHubCommentReporter.md:27:196 error MD056/table-column-count Table column count [Expected: 4; Actual: 3; Too few cells, row will be missing data]
docs/reporters/GitHubCommentReporter.md:27:46 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:27:174 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:27:196 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:28:179 error MD056/table-column-count Table column count [Expected: 4; Actual: 3; Too few cells, row will be missing data]
docs/reporters/GitHubCommentReporter.md:28:46 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:28:160 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:28:179 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:29:159 error MD056/table-column-count Table column count [Expected: 4; Actual: 3; Too few cells, row will be missing data]
docs/reporters/GitHubCommentReporter.md:29:48 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:29:143 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:29:159 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:30:171 error MD056/table-column-count Table column count [Expected: 4; Actual: 3; Too few cells, row will be missing data]
docs/reporters/GitHubCommentReporter.md:30:46 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:30:152 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubCommentReporter.md:30:171 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/reporters/GitHubStatusReporter.md:6 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "GitHub Status Reporter"]
docs/reporters/GitlabCommentReporter.md:6 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Gitlab Comment Reporter"]
docs/reporters/JsonReporter.md:5 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "JSON Reporter"]
docs/reporters/MarkdownSummaryReporter.md:6 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Markdown Summary Reporter"]
docs/reporters/SarifReporter.md:6 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "SARIF Reporter (beta)"]
docs/reporters/TapReporter.md:5 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "TAP Reporter"]
docs/reporters/TextReporter.md:5 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Text Reporter"]
docs/reporters/UpdatedSourcesReporter.md:5 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Updated Sources Reporter"]
docs/special-thanks.md:9 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Special thanks"]
docs/special-thanks.md:23:3 error MD045/no-alt-text Images should have alternate text (alt text)
docs/sponsor.md:5 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Sponsoring"]
docs/supported-linters.md:9 error MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Supported Linters"]
docs/supported-linters.md:95:523 error MD056/table-column-count Table column count [Expected: 4; Actual: 6; Too many cells, extra data will be missing]
mega-linter-runner/README.md:27:274 error MD051/link-fragments Link fragments should be valid [Context: "[**apply formatting and auto-fixes**](#apply-fixes)"]
mega-linter-runner/README.md:27:217 error MD051/link-fragments Link fragments should be valid [Context: "[**reports in several formats**](#reports)"]
mega-linter-runner/README.md:288:691 error MD056/table-column-count Table column count [Expected: 4; Actual: 6; Too many cells, extra data will be missing]
README.md:220:127 error MD051/link-fragments Link fragments should be valid [Context: "[many additional features](#mega-linter-vs-super-linter)"]
README.md:427:691 error MD056/table-column-count Table column count [Expected: 4; Actual: 6; Too many cells, extra data will be missing]
README.md:2229:3 error MD045/no-alt-text Images should have alternate text (alt text)
skills/megalinter-check/performance.md:27:601 error MD013/line-length Line length [Expected: 600; Actual: 713]
skills/megalinter-setup/agents/megalinter-runner.md:33:601 error MD013/line-length Line length [Expected: 600; Actual: 620]

(Truncated to last 5714 characters out of 47767)
⚠️ YAML / prettier - 14 errors
unner/generators/mega-linter/templates/azure-pipelines.yml 6ms (unchanged)
mega-linter-runner/generators/mega-linter/templates/bitbucket-pipelines.yml 7ms (unchanged)
mega-linter-runner/generators/mega-linter/templates/concourse-task.yml 4ms (unchanged)
[error] mega-linter-runner/generators/mega-linter/templates/mega-linter.yml: SyntaxError: Implicit map keys need to be followed by map values (67:11)
[error]   65 |           # Only define `secrets.PAT` if you fully understand the trade-off.
[error]   66 |           token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
[error] > 67 |           <%- PERSIST_CREDENTIALS %>
[error]      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]   68 |
[error]   69 |           # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
[error]   70 |           # improve performance
megalinter/descriptors/action.megalinter-descriptor.yml 20ms (unchanged)
megalinter/descriptors/ansible.megalinter-descriptor.yml 9ms (unchanged)
megalinter/descriptors/api.megalinter-descriptor.yml 12ms (unchanged)
megalinter/descriptors/arm.megalinter-descriptor.yml 6ms (unchanged)
megalinter/descriptors/bash.megalinter-descriptor.yml 15ms (unchanged)
megalinter/descriptors/bicep.megalinter-descriptor.yml 5ms (unchanged)
megalinter/descriptors/c.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/clojure.megalinter-descriptor.yml 20ms (unchanged)
megalinter/descriptors/cloudformation.megalinter-descriptor.yml 6ms (unchanged)
megalinter/descriptors/coffee.megalinter-descriptor.yml 5ms (unchanged)
megalinter/descriptors/copypaste.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/cpp.megalinter-descriptor.yml 5ms (unchanged)
megalinter/descriptors/csharp.megalinter-descriptor.yml 18ms (unchanged)
megalinter/descriptors/css.megalinter-descriptor.yml 9ms (unchanged)
megalinter/descriptors/dart.megalinter-descriptor.yml 10ms (unchanged)
megalinter/descriptors/dockerfile.megalinter-descriptor.yml 6ms (unchanged)
megalinter/descriptors/editorconfig.megalinter-descriptor.yml 7ms (unchanged)
megalinter/descriptors/env.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/gherkin.megalinter-descriptor.yml 5ms (unchanged)
megalinter/descriptors/go.megalinter-descriptor.yml 16ms (unchanged)
megalinter/descriptors/graphql.megalinter-descriptor.yml 5ms (unchanged)
megalinter/descriptors/groovy.megalinter-descriptor.yml 5ms (unchanged)
megalinter/descriptors/html.megalinter-descriptor.yml 8ms (unchanged)
megalinter/descriptors/java.megalinter-descriptor.yml 11ms (unchanged)
megalinter/descriptors/javascript.megalinter-descriptor.yml 15ms (unchanged)
megalinter/descriptors/json.megalinter-descriptor.yml 14ms (unchanged)
megalinter/descriptors/jsx.megalinter-descriptor.yml 6ms (unchanged)
megalinter/descriptors/kotlin.megalinter-descriptor.yml 9ms (unchanged)
megalinter/descriptors/kubernetes.megalinter-descriptor.yml 12ms (unchanged)
megalinter/descriptors/latex.megalinter-descriptor.yml 3ms (unchanged)
megalinter/descriptors/lua.megalinter-descriptor.yml 8ms (unchanged)
megalinter/descriptors/markdown.megalinter-descriptor.yml 15ms (unchanged)
megalinter/descriptors/perl.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/php.megalinter-descriptor.yml 20ms (unchanged)
megalinter/descriptors/powershell.megalinter-descriptor.yml 7ms (unchanged)
megalinter/descriptors/protobuf.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/python.megalinter-descriptor.yml 75ms (unchanged)
megalinter/descriptors/r.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/raku.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/repository.megalinter-descriptor.yml 95ms (unchanged)
megalinter/descriptors/robotframework.megalinter-descriptor.yml 9ms (unchanged)
megalinter/descriptors/rst.megalinter-descriptor.yml 9ms (unchanged)
megalinter/descriptors/ruby.megalinter-descriptor.yml 6ms (unchanged)
megalinter/descriptors/rust.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/salesforce.megalinter-descriptor.yml 31ms (unchanged)
megalinter/descriptors/scala.megalinter-descriptor.yml 5ms (unchanged)
megalinter/descriptors/shared/biome.megalinter-linter.yml 10ms (unchanged)
megalinter/descriptors/shared/clang-format.megalinter-linter.yml 4ms (unchanged)
megalinter/descriptors/shared/cppcheck.megalinter-linter.yml 3ms (unchanged)
megalinter/descriptors/shared/cpplint.megalinter-linter.yml 3ms (unchanged)
megalinter/descriptors/shared/dotnet-format.megalinter-linter.yml 4ms (unchanged)
megalinter/descriptors/shared/eslint.megalinter-linter.yml 4ms (unchanged)
megalinter/descriptors/shared/prettier.megalinter-linter.yml 5ms (unchanged)
megalinter/descriptors/shared/v8r.megalinter-linter.yml 4ms (unchanged)
megalinter/descriptors/snakemake.megalinter-descriptor.yml 8ms (unchanged)
megalinter/descriptors/spell.megalinter-descriptor.yml 29ms (unchanged)
megalinter/descriptors/sql.megalinter-descriptor.yml 5ms (unchanged)
megalinter/descriptors/swift.megalinter-descriptor.yml 6ms (unchanged)
megalinter/descriptors/tekton.megalinter-descriptor.yml 4ms (unchanged)
megalinter/descriptors/terraform.megalinter-descriptor.yml 34ms (unchanged)
megalinter/descriptors/tsx.megalinter-descriptor.yml 9ms (unchanged)
megalinter/descriptors/typescript.megalinter-descriptor.yml 16ms (unchanged)
megalinter/descriptors/vbdotnet.megalinter-descriptor.yml 3ms (unchanged)
megalinter/descriptors/xml.megalinter-descriptor.yml 9ms (unchanged)
megalinter/descriptors/yaml.megalinter-descriptor.yml 12ms (unchanged)
server/docker-compose-dev.yml 4ms (unchanged)
server/docker-compose.yml 4ms (unchanged)
trivy-secret.yaml 1ms (unchanged)
zizmor.yml 4ms (unchanged)

(Truncated to last 5714 characters out of 12559)
⚠️ YAML / yamllint - 54 errors
.grype.yaml
  6:1       warning  missing document start "---"  (document-start)

mega-linter-runner/.eslintrc.yml
  11:9      warning  too few spaces inside empty braces  (braces)

mega-linter-runner/generators/mega-linter-custom-flavor/templates/megalinter-custom-flavor-builder.yml
  48:15     warning  too few spaces inside empty braces  (braces)

mega-linter-runner/generators/mega-linter-custom-flavor/templates/megalinter-custom-flavor.yml
  7:1       error    syntax error: could not find expected ':' (syntax)

mega-linter-runner/generators/mega-linter/templates/mega-linter.yml
  38:15     warning  too few spaces inside empty braces  (braces)
  69:11     error    syntax error: could not find expected ':' (syntax)

megalinter/descriptors/copypaste.megalinter-descriptor.yml
  19:301    warning  line too long (313 > 300 characters)  (line-length)
  25:301    warning  line too long (384 > 300 characters)  (line-length)

megalinter/descriptors/javascript.megalinter-descriptor.yml
  52:301    warning  line too long (475 > 300 characters)  (line-length)
  328:301   warning  line too long (307 > 300 characters)  (line-length)
  354:301   warning  line too long (315 > 300 characters)  (line-length)

megalinter/descriptors/json.megalinter-descriptor.yml
  112:301   warning  line too long (315 > 300 characters)  (line-length)

megalinter/descriptors/jsx.megalinter-descriptor.yml
  29:301    warning  line too long (475 > 300 characters)  (line-length)

megalinter/descriptors/perl.megalinter-descriptor.yml
  25:301    warning  line too long (310 > 300 characters)  (line-length)

megalinter/descriptors/php.megalinter-descriptor.yml
  200:301   warning  line too long (389 > 300 characters)  (line-length)
  214:301   warning  line too long (302 > 300 characters)  (line-length)

megalinter/descriptors/repository.megalinter-descriptor.yml
  27:301    warning  line too long (666 > 300 characters)  (line-length)
  193:301   warning  line too long (408 > 300 characters)  (line-length)
  299:301   warning  line too long (345 > 300 characters)  (line-length)
  537:301   warning  line too long (306 > 300 characters)  (line-length)
  616:301   warning  line too long (374 > 300 characters)  (line-length)
  701:301   warning  line too long (316 > 300 characters)  (line-length)
  955:301   warning  line too long (519 > 300 characters)  (line-length)
  1056:301  warning  line too long (1263 > 300 characters)  (line-length)
  1172:301  warning  line too long (879 > 300 characters)  (line-length)
  1202:301  warning  line too long (358 > 300 characters)  (line-length)
  1265:301  warning  line too long (346 > 300 characters)  (line-length)
  1272:301  warning  line too long (307 > 300 characters)  (line-length)

megalinter/descriptors/salesforce.megalinter-descriptor.yml
  54:301    warning  line too long (359 > 300 characters)  (line-length)
  158:301   warning  line too long (390 > 300 characters)  (line-length)
  170:301   warning  line too long (408 > 300 characters)  (line-length)
  174:301   warning  line too long (413 > 300 characters)  (line-length)

megalinter/descriptors/spell.megalinter-descriptor.yml
  181:301   warning  line too long (315 > 300 characters)  (line-length)

megalinter/descriptors/sql.megalinter-descriptor.yml
  27:301    warning  line too long (403 > 300 characters)  (line-length)

megalinter/descriptors/terraform.megalinter-descriptor.yml
  28:301    warning  line too long (330 > 300 characters)  (line-length)
  43:301    warning  line too long (330 > 300 characters)  (line-length)
  97:301    warning  line too long (346 > 300 characters)  (line-length)
  164:301   warning  line too long (328 > 300 characters)  (line-length)
  239:301   warning  line too long (307 > 300 characters)  (line-length)
  250:301   warning  line too long (386 > 300 characters)  (line-length)
  304:301   warning  line too long (302 > 300 characters)  (line-length)
  319:301   warning  line too long (334 > 300 characters)  (line-length)
  329:301   warning  line too long (525 > 300 characters)  (line-length)
  339:301   warning  line too long (315 > 300 characters)  (line-length)
  343:301   warning  line too long (436 > 300 characters)  (line-length)

megalinter/descriptors/tsx.megalinter-descriptor.yml
  29:301    warning  line too long (475 > 300 characters)  (line-length)

megalinter/descriptors/typescript.megalinter-descriptor.yml
  39:301    warning  line too long (475 > 300 characters)  (line-length)
  318:301   warning  line too long (314 > 300 characters)  (line-length)
  344:301   warning  line too long (315 > 300 characters)  (line-length)

megalinter/descriptors/yaml.megalinter-descriptor.yml
  38:301    warning  line too long (315 > 300 characters)  (line-length)

mkdocs.yml
  8:301     warning  line too long (590 > 300 characters)  (line-length)
  86:5      warning  wrong indentation: expected 6 but found 4  (indentation)
  100:5     warning  wrong indentation: expected 6 but found 4  (indentation)

zizmor.yml
  1:1       warning  missing document start "---"  (document-start)

✅ Linters with no issues

actionlint, bash-exec, betterleaks, black, checkov, flake8, git_diff, grype, hadolint, isort, jsonlint, markdown-table-formatter (10 fixes), mypy, npm-groovy-lint, osv-scanner, pylint, ruff, secretlint, shellcheck, shfmt, spectral, syft, trivy, trivy-sbom, trufflehog, v8r, v8r, xmllint, zizmor

See detailed reports in MegaLinter artifacts

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

…ts the run

Fixes #8807

trivy could end a MegaLinter run with the confusing fatal error
"--skip-db-update cannot be specified on the first run": after 5 immediate
retries, TrivyLinter always fell back to --skip-db-update, which trivy refuses
when no database has ever been downloaded.

- Point trivy at all official database mirrors (mirror.gcr.io, ghcr.io and
  public.ecr.aws) through --db-repository / --java-db-repository, unless the
  user configured TRIVY_DB_REPOSITORY, --db-repository or db.repository
- Space the download retries with an exponential backoff (10s, 20s, 40s, 60s)
  so they no longer all land within the same rate limit minute
- Only run the last-chance --skip-db-update attempt when a database is
  actually cached (db/trivy.db + db/metadata.json), looking at --cache-dir,
  cache.dir, TRIVY_CACHE_DIR, XDG_CACHE_HOME, HOME and the database shipped
  within the docker image; log an actionable error otherwise
- Only retry when trivy aborted (FATAL): a rate limit while fetching the
  optional checks bundle no longer triggers useless retries
- Report the resolution guidance once instead of once per attempt
- TrivySbomLinter inherits the same behaviour
- New configuration variables: <LINTER>_DB_REPOSITORIES,
  <LINTER>_JAVA_DB_REPOSITORIES, <LINTER>_DB_RETRY_ATTEMPTS,
  <LINTER>_DB_RETRY_INITIAL_DELAY, <LINTER>_DB_RETRY_MAX_DELAY
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this pull request should stay open, please remove the O: stale 🤖 label or comment on the pull request.

@github-actions github-actions Bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Sep 27, 2026
@github-actions github-actions Bot removed the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Sep 30, 2026

This branch had an error being deployed

1 failed deployment
dev — 37376472 Deployed Sep 29, 2026 by nvuillam via MegaLinter #53463
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.

[Trivy] TOOMANYREQUESTS DB error: database error: --skip-db-update cannot be specified on the first run

1 participant