Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
•
IT NachrichtenSamsung Galaxy S26 FE review: false economy(24.09.2026 um 22:07 Uhr)
••••••••••
IT NachrichtenSamsung Galaxy S26 FE review: false economy(24.09.2026 um 22:07 Uhr)
•••••••••
Intelligence View
⚡ tsecurity.de Intelligence

GitHub Code Coverage in Pull Requests: What Developers Should Set Up Now

GitHub just made code coverage visible inside pull requests through GitHub Code Quality, now in public preview. That sounds like a small UI update, but it changes a common review problem: reviewers often approve code without knowing…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

GitHub just made code coverage visible inside pull requests through GitHub Code Quality, now in public preview.



That sounds like a small UI update, but it changes a common review problem: reviewers often approve code without knowing whether the new path is tested at all. If coverage is available directly in the PR, the conversation moves from vague “please add tests” comments to a clearer signal: what changed, what is covered, and what should we block before merge?



This post breaks down what shipped, why it matters, and how to wire it into a real GitHub Actions workflow.






What changed?



GitHub Code Quality can now show an aggregate code coverage percentage directly on pull requests.



Instead of sending reviewers to a separate coverage dashboard, your CI can upload a Cobertura XML report to GitHub, and GitHub displays the coverage context where the review already happens.



At a high level:




  1. Your CI runs tests.

  2. Your test tooling generates a Cobertura coverage report.

  3. GitHub Actions uploads that report using actions/upload-code-coverage.

  4. The pull request shows coverage information for reviewers.



GitHub says the feature is available for GitHub Team and GitHub Enterprise Cloud users during the preview period, and the preview is currently free.






Why this is useful in code review



Coverage is not the same thing as quality. A codebase can have high coverage and still have weak tests.



But coverage is still a useful review signal because it catches obvious gaps early:




  • new business logic with no tests

  • refactors that accidentally remove coverage

  • risky files that keep changing without test protection

  • PRs where reviewers need to ask better questions before merge



The win is not “coverage number go up.” The win is reviewers seeing test completeness without leaving the PR.






Minimal GitHub Actions setup



The new upload action expects a Cobertura XML file.



Here is a practical Python example using pytest-cov:




name: CI

on:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

permissions:
contents: read
code-quality: write

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install -r requirements.txt

- name: Run tests with coverage
run: |
pytest --cov=. --cov-report=xml:cobertura.xml

- name: Upload coverage to GitHub Code Quality
uses: actions/upload-code-coverage@v1
with:
file: cobertura.xml
language: Python
label: code-coverage/pytest






The important permission is:




permissions:
contents: read
code-quality: write






Without code-quality: write, the workflow can run tests successfully but fail to upload the coverage report.






Node.js example



If your project is JavaScript or TypeScript, the idea is the same: generate Cobertura, then upload it.



For example, with Jest:




{
"scripts": {
"test:coverage": "jest --coverage --coverageReporters=cobertura"
}
}






Then in GitHub Actions:




- name: Run tests with coverage
run: npm run test:coverage

- name: Upload coverage to GitHub Code Quality
uses: actions/upload-code-coverage@v1
with:
file: coverage/cobertura-coverage.xml
language: TypeScript
label: code-coverage/jest






Adjust the language, label, and file path based on your stack.






A better pattern for larger teams



For production repos, I would avoid mixing “test execution” and “coverage upload” too tightly.



A cleaner pattern is:




  1. Run tests in the main CI job.

  2. Upload the coverage XML as a workflow artifact.

  3. Use a separate upload job with the narrow code-quality: write permission.



That keeps permissions scoped and makes debugging easier.




jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- run: ./scripts/test-with-coverage.sh
- uses: actions/upload-artifact@v4
with:
name: coverage-report
path: cobertura.xml

upload-coverage:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
code-quality: write
steps:
- uses: actions/download-artifact@v4
with:
name: coverage-report

- uses: actions/upload-code-coverage@v1
with:
file: cobertura.xml
language: Python
label: code-coverage/ci






This is especially useful if your organization is strict about GitHub token permissions.






What not to do



Do not turn coverage into a vanity metric.



A few bad patterns:




  • blocking every PR because coverage dropped by 0.1%

  • rewarding useless tests that only execute lines without assertions

  • treating generated files, migrations, and config as equally important as core logic

  • ignoring flaky tests because the coverage number looks good



A healthier rule is:




Coverage should guide review, not replace review.




Use it to ask better questions:




  • Is the risky path covered?

  • Are failure cases tested?

  • Did this PR reduce coverage in files that matter?

  • Are the tests meaningful or just line execution?






Practical checklist



If you want to try this today:




  • Confirm your repo has GitHub Code Quality enabled.

  • Generate Cobertura XML from your test runner.

  • Add code-quality: write to the upload job permissions.

  • Use actions/upload-code-coverage@v1.

  • Start by surfacing coverage in PRs before enforcing strict gates.

  • Decide which files should be excluded from coverage expectations.

  • Document what coverage means for your team.






Takeaway



GitHub putting coverage directly in pull requests is a nice step toward more useful code review.



Not because coverage is perfect, but because context matters. If reviewers can see test coverage while they are already reviewing the diff, teams can catch missing tests earlier and avoid yet another external dashboard.



Start simple: upload the report, observe the signal, and only then decide whether your team needs stricter rules.






References



SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - GitHub Code Coverage in Pull Requests: What Developers Should Set Up Now
id: 951a4f2d-841f-4866-8bd6-f7738fd1b721
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "GitHub Code Coverage in Pull R" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("GitHub Code Coverage in Pull Requests Wh")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*GitHub Code Coverage in Pull Requests Wh*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "GitHub Code Coverage in Pull Requests Wh"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich GitHub Code Coverage in Pull Requests: W.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten GitHub Code Coverage in Pull Requests: What Developers Should Set Up Now

Thematisch verwandte Begriffe: GitHub, Code, Coverage, Pull · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-81473 | Dell Rugged Control Center (RCC), versions prior to 5.2.206, contain an …
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel • Rechts: nächster Artikel • unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...
↗ Original-Quelle