1. Resources
  2. Detection rules
  3. Workflow Run or Logs Deleted in GitHub Actions

Workflow Run or Logs Deleted in GitHub Actions detection rules

After a workflow has printed secrets to its log, the attacker deletes the run, its logs or its artifacts, so the repository shows no trace of the job that leaked them. The deletion itself stays in the audit log.

Platform
GitHub
Severity
Medium
Log source
GitHub audit log
Last updated
MITRE ATT&CK technique
T1070Indicator Removal
Tactic
Stealth
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Write access to the repository, held by a user, a token or an app, and a workflow run that has completed.
Impact
The job logs, the run record and the artifacts disappear, so responders cannot see which secrets a workflow printed or which commit it ran.
Response
Rotate the secrets that the jobs of the deleted run were given, and revoke the token or secure the account that deleted the run.
Mitigation
Stream the audit log to a SIEM with its own retention, and keep production secrets in environments with required reviewers and branch restrictions.
Audit actions
business.set_actions_retention_limitorg.set_actions_retention_limitrepo.set_actions_retention_limitactions_cache.deleteartifact.destroyworkflows.delete_workflow_runchecks.delete_logs

How the attack works

GitHub Actions keeps a record of every workflow run: the run with its trigger, branch and commit, the logs of each job and the artifacts the jobs uploaded. Anyone with write access to a repository can delete a workflow run that has completed, and logs and artifacts can be deleted on their own. For a normal team this is housekeeping. For an attacker who used a workflow to read secrets, it removes the only place in the repository that shows what the workflow did.

The token theft campaigns reported in late 2026 use this as their last step. In the campaign that Wiz tracks as Gheist, as summarised by the Cloud Security Alliance, a stolen token pushes a workflow file to a new branch, the workflow prints the secrets it can reach to the run log in an encoded form, and the operator reads the log through the API and deletes the run within seconds. Help Net Security reports the same step for the wfx-loot campaign that Aikido described: the change is reverted and the workflow run and its logs are deleted within about a minute. What remains is the audit log, where workflows.delete_workflow_run records the run, its branch and commit and the account that deleted it. checks.delete_logs and artifact.destroy record the deletion of logs and of an artifact. Two quieter events belong to the same picture: the three set_actions_retention_limit actions record a change of how long GitHub keeps artifacts and logs, and actions_cache.delete records a cache deleted through the REST API.

What an attacker needs

  • Write access to the repository, held by a member, a collaborator, a personal access token or an app. GitHub requires write access to delete a workflow run.
  • A run that has completed, or one that is more than two weeks old.

Impact

The job logs, the run record and the artifacts are gone, so responders cannot read which values a workflow printed, which commit it ran or what it uploaded. Without that record every secret the repository's workflows can reach has to be treated as exposed. The deletion is usually the end of a secret theft, so the damage behind it is the use of those secrets in cloud accounts, registries and other repositories.

Detection rules

GitHub Actions Artifact and Log Retention Period Changed

Detects a change of the retention period for GitHub Actions artifacts and logs, for an enterprise, an organization or a repository (the three set_actions_retention_limit actions). A shorter period makes GitHub remove the logs and artifacts of workflow runs sooner, which has the same effect as deleting them by hand, only later and without a deletion event per run. GitHub lists the field limit for the event but does not document its values, so the rule matches on the event only and cannot tell a shorter period from a longer one.

LevelLowStatusExperimentalLog sourceGitHub audit log
title: GitHub Actions Artifact and Log Retention Period Changed
id: a1ebfb34-0015-4752-8245-2848a8ab103b
status: experimental
description: >-
  Detects a change of the retention period for GitHub Actions artifacts and
  logs, for an enterprise, an organization or a repository (the three
  set_actions_retention_limit actions). A shorter period makes GitHub remove
  the logs and artifacts of workflow runs sooner, which has the same effect
  as deleting them by hand, only later and without a deletion event per run.
  GitHub lists the field limit for the event but does not document its
  values, so the rule matches on the event only and cannot tell a shorter
  period from a longer one.
references:
  - https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
  - https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-organization-settings/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization
  - https://attack.mitre.org/techniques/T1070/
author: Forestall
date: 2026-11-18
tags:
  - attack.stealth
  - attack.t1070
logsource:
  product: github
  service: audit
detection:
  selection:
    action:
      - business.set_actions_retention_limit
      - org.set_actions_retention_limit
      - repo.set_actions_retention_limit
  condition: selection
falsepositives:
  - Administrators who shorten retention to save storage or lengthen it for compliance. The setting changes rarely, so confirm each change with the person who made it.
level: low

False positives

  • Administrators who shorten retention to save storage or lengthen it for compliance. The setting changes rarely, so confirm each change with the person who made it.

GitHub Actions Cache Deleted Through the REST API

Detects a GitHub Actions cache being deleted through the REST API (actions_cache.delete, which GitHub describes as a cache that was deleted using the REST API). A cache holds files that later workflow runs restore and trust, so a deleted cache makes the next run build it again, and it removes what an earlier run stored. The event names the cache in actions_cache_key and actions_cache_scope. Cleanup jobs delete caches all the time, so this is a low level signal that gains meaning next to the run deletion events of the same repository.

LevelLowStatusExperimentalLog sourceGitHub audit log
title: GitHub Actions Cache Deleted Through the REST API
id: 4f32fa1f-5dbc-47ed-b4f9-e8c2a42c16f1
status: experimental
description: >-
  Detects a GitHub Actions cache being deleted through the REST API
  (actions_cache.delete, which GitHub describes as a cache that was deleted
  using the REST API). A cache holds files that later workflow runs restore
  and trust, so a deleted cache makes the next run build it again, and it
  removes what an earlier run stored. The event names the cache in
  actions_cache_key and actions_cache_scope. Cleanup jobs delete caches all
  the time, so this is a low level signal that gains meaning next to the run
  deletion events of the same repository.
references:
  - https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
  - https://docs.github.com/en/enterprise-cloud@latest/rest/actions/cache
  - https://attack.mitre.org/techniques/T1070/
author: Forestall
date: 2026-11-18
tags:
  - attack.stealth
  - attack.t1070
logsource:
  product: github
  service: audit
detection:
  selection:
    action: actions_cache.delete
  condition: selection
falsepositives:
  - Workflows and scripts that delete caches to stay under the storage limit or to force a clean build. Exclude the identity that does the cleanup by actor.
level: low

False positives

  • Workflows and scripts that delete caches to stay under the storage limit or to force a clean build. Exclude the identity that does the cleanup by actor.

GitHub Actions Workflow Run Artifact Deleted

Detects a workflow run artifact being deleted by hand (artifact.destroy, which GitHub describes as a workflow run artifact that was manually deleted). An artifact can hold what a job collected, so its deletion after a suspicious run removes part of the evidence. The event names the run in workflow_run_id, which ties it to the run deletion and run creation events of the same run.

LevelLowStatusExperimentalLog sourceGitHub audit log
title: GitHub Actions Workflow Run Artifact Deleted
id: 16496e7c-bf3a-42aa-b257-e818bd6ca680
status: experimental
description: >-
  Detects a workflow run artifact being deleted by hand (artifact.destroy,
  which GitHub describes as a workflow run artifact that was manually
  deleted). An artifact can hold what a job collected, so its deletion after
  a suspicious run removes part of the evidence. The event names the run in
  workflow_run_id, which ties it to the run deletion and run creation events
  of the same run.
references:
  - https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
  - https://attack.mitre.org/techniques/T1070/
author: Forestall
date: 2026-11-18
tags:
  - attack.stealth
  - attack.t1070
logsource:
  product: github
  service: audit
detection:
  selection:
    action: artifact.destroy
  condition: selection
falsepositives:
  - Teams that delete large artifacts to free storage, and scripts that prune artifacts. Exclude the identity that does the pruning by actor.
level: low

False positives

  • Teams that delete large artifacts to free storage, and scripts that prune artifacts. Exclude the identity that does the pruning by actor.

GitHub Actions Workflow Run or Logs Deleted

Detects a workflow run being deleted (workflows.delete_workflow_run) and the logs of a check suite being deleted (checks.delete_logs). Deleting a run needs write access to the repository only, and it removes the job logs that show what a workflow printed. Attackers who use a workflow to read secrets delete the run afterwards. The run deletion event carries the run in workflow_run_id and run_number, its branch and commit in head_branch and head_sha, and its trigger in event.

LevelMediumStatusExperimentalLog sourceGitHub audit log
title: GitHub Actions Workflow Run or Logs Deleted
id: bbf26742-27ce-4e6d-8937-8ef564c4af55
status: experimental
description: >-
  Detects a workflow run being deleted (workflows.delete_workflow_run) and
  the logs of a check suite being deleted (checks.delete_logs). Deleting a
  run needs write access to the repository only, and it removes the job logs
  that show what a workflow printed. Attackers who use a workflow to read
  secrets delete the run afterwards. The run deletion event carries the run
  in workflow_run_id and run_number, its branch and commit in head_branch
  and head_sha, and its trigger in event.
references:
  - https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
  - https://docs.github.com/en/actions/how-tos/manage-workflow-runs/delete-a-workflow-run
  - https://attack.mitre.org/techniques/T1070/
author: Forestall
date: 2026-11-18
tags:
  - attack.stealth
  - attack.t1070
logsource:
  product: github
  service: audit
detection:
  selection:
    action:
      - workflows.delete_workflow_run
      - checks.delete_logs
  condition: selection
falsepositives:
  - Developers who delete a failed or mistaken run, and cleanup jobs that delete old runs. Exclude the identity your cleanup uses by actor, and look first at deletions made with a token and at runs on branches nobody builds from.
level: medium

False positives

  • Developers who delete a failed or mistaken run, and cleanup jobs that delete old runs. Exclude the identity your cleanup uses by actor, and look first at deletions made with a token and at runs on branches nobody builds from.

One Actor Deleted Workflow Runs in Many GitHub Repositories

Counts, per actor, the different repositories in which a workflow run was deleted (workflows.delete_workflow_run, counted by repo). A cleanup job deletes many runs in one repository. A stolen token that plants a workflow in every repository it can write to, reads the log and deletes the run leaves one deletion in each of many repositories. Five or more repositories for one actor within 30 minutes fit that second pattern. The count and the window are starting points to tune.

Fires when one actor has at least 5 different repo values within 30 minutes.

Threshold ruleLevelHighStatusExperimentalLog sourceGitHub audit log
title: GitHub Actions Workflow Run Deleted (Bulk Deletion Base Event)
id: 6eeeaf54-6d5d-4cad-b06a-199c76dd44f6
name: github_workflow_run_deleted
status: experimental
description: >-
  Base event of the threshold rule in this file. A
  workflows.delete_workflow_run event, which GitHub writes when a workflow
  run is deleted.
logsource:
  product: github
  service: audit
detection:
  selection:
    action: workflows.delete_workflow_run
  condition: selection
level: low
---
title: One Actor Deleted Workflow Runs in Many GitHub Repositories
id: 1c6ea168-9a0e-4b2c-b620-2fc660391738
status: experimental
description: >-
  Counts, per actor, the different repositories in which a workflow run was
  deleted (workflows.delete_workflow_run, counted by repo). A cleanup job
  deletes many runs in one repository. A stolen token that plants a workflow
  in every repository it can write to, reads the log and deletes the run
  leaves one deletion in each of many repositories. Five or more
  repositories for one actor within 30 minutes fit that second pattern. The
  count and the window are starting points to tune.
references:
  - https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
  - https://docs.github.com/en/actions/how-tos/manage-workflow-runs/delete-a-workflow-run
  - https://labs.cloudsecurityalliance.org/research/csa-research-note-gheist-github-token-actions-secret-theft-2/
  - https://attack.mitre.org/techniques/T1070/
author: Forestall
date: 2026-11-18
tags:
  - attack.stealth
  - attack.t1070
correlation:
  type: value_count
  rules:
    - github_workflow_run_deleted
  group-by:
    - actor
  timespan: 30m
  condition:
    field: repo
    gte: 5
falsepositives:
  - An organization-wide cleanup that deletes old runs in every repository under one identity. Exclude that identity by actor.
  - The values of 5 repositories and 30 minutes are starting points, not tested limits. A campaign that works through few repositories stays below the count, and the single-event rule on this page covers that case.
level: high

False positives

  • An organization-wide cleanup that deletes old runs in every repository under one identity. Exclude that identity by actor.
  • The values of 5 repositories and 30 minutes are starting points, not tested limits. A campaign that works through few repositories stays below the count, and the single-event rule on this page covers that case.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Workflow run deleted within minutes of its creation

Detection hypothesisSequence of eventsJoins two logs

A run that exists only to print secrets is started, read and deleted in one short burst by one credential. Housekeeping deletes runs that are days or weeks old. A run whose deletion follows its creation by minutes is therefore much more telling than a deletion on its own.

  1. A run starts: workflows.created_workflow_run. Keep workflow_run_id, repo, actor, head_branch, head_sha and the time. GitHub delivers this event through the REST API, audit log streaming and exports only.
  2. The same run is deleted: workflows.delete_workflow_run with the same workflow_run_id within 15 minutes of the start.
  3. Raise the priority when head_branch is not a branch your teams build from, and when programmatic_access_type of the deletion shows that a token was used.

Eventsworkflows.created_workflow_runworkflows.delete_workflow_run

LimitsA developer who deletes a failed test run right away matches as well. The first event is not in the web interface, so the join needs a stream or an export. The 15 minutes are a starting point, and an operator who waits longer before deleting is not matched.

Deleted workflow run whose jobs had been given secrets

Detection hypothesisJoins two logs

Deleting a run matters most when its jobs could read secrets. The job start event lists the secrets a job was given, so joining it to the deletion on the run ID tells apart the cleanup of a test run from the removal of a run that held deployment credentials, and names the secrets to rotate.

  1. A run is deleted: workflows.delete_workflow_run. Take workflow_run_id and repo.
  2. Look back for workflows.prepared_workflow_job events with the same workflow_run_id. The field secrets_passed lists the secrets provided to the job and environment_name the deployment environment it used.
  3. Alert when at least one job of the deleted run was given secrets, and attach the list of secrets and the environment to the alert.

Eventsworkflows.delete_workflow_runworkflows.prepared_workflow_job

LimitsThe job start event reaches only the REST API, audit log streaming and exports. Deployment runs are given secrets as a rule, so a team that cleans up old deployment runs matches and has to be excluded by actor or by the age of the run.

Triage

  • Identify who deleted the run (actor), the repository (repo), the run (workflow_run_id, run_number, name), its branch and commit (head_branch, head_sha) and what triggered it (event).
  • Check whether a token did it. programmatic_access_type and hashed_token identify the credential, and user_agent shows the client.
  • Find the start of the same run. workflows.created_workflow_run with the same workflow_run_id shows who started it and when, and a run that lived for only a few minutes is the pattern of the campaigns above.
  • Check whether head_branch still exists and whether the commit in head_sha added or changed a file under the workflows folder. A branch that was created and removed around the run is a strong sign.
  • Read the workflows.prepared_workflow_job events with the same workflow_run_id. Their secrets_passed field lists the secrets the jobs were given.

Response

Once the attack is confirmed:

  1. Rotate the secrets that the jobs of the deleted run were given, which secrets_passed in the workflows.prepared_workflow_job events lists. Where those events were not collected, rotate every secret the repository's workflows can reach, including organization secrets and the secrets of environments without protection rules.
  2. Revoke the token that deleted the run, or end the sessions of the account and reset its credentials when a person's account did it.
  3. Remove the workflow file and the branch that the run used if they still exist, and search the other repositories that the same account or token can write to for the same pattern.
  4. Review the audit logs of the cloud accounts and registries that the exposed secrets open, for the period since the run started. Look for new access keys, changed role trust policies and new federated credentials, which keep working after the secrets are rotated.
  5. Export the audit log events of the affected repositories for the period, so that the record outlives the retention of the audit log.

Mitigation

  • Stream the audit log to a SIEM with retention of your own, so that the deletion of a run does not remove the last record of it. The stream also carries the events that show when a run was created and which secrets its jobs were given.
  • Keep production secrets in environments with required reviewers and a restriction on the branches that may deploy, so that a workflow pushed to a new branch cannot read them.
  • Keep write access to repositories small, and give tokens access to the repositories they need and no more, because write access is all that deleting a run takes.
  • Alert on run and log deletions by people and tokens, and let only a known cleanup identity delete runs in bulk.

Frequently asked questions

What is left after a workflow run has been deleted?

The run, its job logs and its place in the run history are gone from the repository, and often the only visible sign is a missing run number. The audit log keeps `workflows.delete_workflow_run` with the account, the run ID, the branch and the commit. Where the audit log is streamed, the events that recorded the start of the run and its jobs are kept as well.

Who can delete a workflow run?

GitHub requires write access to the repository, and the run has to be completed or more than two weeks old. No administrator right is needed. A stolen token that can push a workflow file to a branch can therefore also delete the run that the push started.

Is every deleted workflow run a sign of an attack?

No. Developers delete failed test runs and cleanup scripts delete old runs in bulk. That is why a single deletion needs the context that triage adds, and why the threshold rule counts repositories instead of runs. A run that is deleted minutes after it was created, on a branch nobody knows, by a token, deserves the closest look.

Which secrets have to be rotated when a deleted run looks suspicious?

The `workflows.prepared_workflow_job` events of the run list the secrets that were provided to its jobs in `secrets_passed`. GitHub delivers these events through the REST API, audit log streaming and exports only. Without them the safe assumption is that every secret the repository's workflows can reach was read.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.