Skip to content
Skills Library
Security · Review & audit

background-job-context-continuity

/background-job-context-continuity

Verify asynchronous jobs carry the authorization context of the identity that created them, so a queued task never gains or loses permission en route. Use when operations enqueue work asynchronously, from emails and reports to exports, webhooks and internal worker queues

Repository
authzmap ↗
Licence
MIT
Last repository change
28.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Verify asynchronous jobs carry the authorization context of the identity that created them, so a queued task never gains or loses permission en route. Use when operations enqueue work asynchronously, from emails and reports to exports, webhooks and internal worker queues

Original author description

Verify asynchronous jobs carry the authorization context of the identity that created them, so a queued task never gains or loses permission en route. Use when operations enqueue work asynchronously, from emails and reports to exports, webhooks and internal worker queues

How it works

  1. Procedure
  2. Signals
  3. Patterns
  4. Pitfalls
  5. Done when
  6. References
Original SKILL.md headings · 61 lines, 410 words
SKILL.md preview
---
name: background-job-context-continuity
description: "Verify asynchronous jobs carry the authorization context of the identity that created them, so a queued task never gains or loses permission en route. Use when operations enqueue work asynchronously, from emails and reports to exports, webhooks and internal worker queues"
pack: authzmap
version: 1.0.0
category: api-security
tags: [async, jobs, context]
---

# Background Job Context Continuity

> Verify asynchronous jobs carry the authorization context of the identity that created them, so a queued task never gains or loses permission en route

**Use when:** operations enqueue work asynchronously, from emails and reports to exports, webhooks and internal worker queues

**Avoid when:** everything executes synchronously inside the request and background paths demonstrably do not exist

## Procedure

1. Enumerate asynchronous paths that any operation enqueues: queued tasks, scheduled jobs, webhooks, notification pipes and workers.
2. Trigger a job as each of your identities and record the context serialized into the queue: identity, tenant, scopes and roles.
3. Observe the executed job's authorization state: what it reads and writes, and whether it is checked against the creating identity.
4. Test state changes between enqueue and run, so a demoted or suspended identity's already-queued work is measured.
5. Record what the job writes, who it notifies and whether it honors creation-time identity for every downstream step.
6. Repeat for scheduled jobs that invoke on behalf of users, since residual identity drifts earliest in these paths.

## Signals

- A queued job executes with service-level privileges far wider than the identity that triggered it.
- A job for a suspended or demoted identity still grants resources that the requester would no longer be entitled to.
- Scheduled jobs that run on behalf of identities no longer capture the identity's present state at execution time.
- Webhooks triggered by jobs carry credentials from the trigger time rather than validated at delivery time.

## Patterns

**1. Queue sample**

```text
enqueue job(runner=alice tenant=A) -> run at executor=service-scope: tier=global-admin -> context dropped
```

**2. State-drift**

```text
alice demoted after enqueue -> job still exports tenant-A private rows -> run executes with enqueue-time privileges
```

**3. Result row**

```text
producer=POST /api/exports ran=in-worker context=alice-snapshot rights-at-runtime=stale major=role-grant-kept
```

## Pitfalls

- Assuming the queue serializes identity by default, when context is frequently dropped in serialized forms and rehydrated raw.
- Measuring one job type, such as exports, while scheduled and advertising jobs behave differently.
- Ignoring deduplication caches and run-history records that may preserve or leak prior authorization-time state.

## Done when

- Every asynchronous path with authorization context is enumerated, its serialized state recorded and its run-time rights observed.
- State drift between enqueue and run is tested explicitly and each outcome classified as faithful, stale or elevated.

## References

- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)
- [OWASP Web Security Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)

Versions

The database has no other skills named background-job-context-continuity.

Database snapshot: 13.11.2026 · package version da193d859404 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100queues-jobs
    Implement reliable asynchronous jobs and message consumers with explicit delivery, retry and shutdown semantics. Use when adding BullMQ or another established queue, background processing or scheduled work; enqueue success is not job completion.
  • 100laravel-background-processing
    Build scalable asynchronous workflows using Queues, Jobs, and Events in Laravel. Use when implementing queued jobs, event-driven workflows, or async processing in Laravel.
  • 90background-jobs
    Designs and reviews background jobs, task queues, workers and scheduled (cron) jobs - queue choice, small ID-based payloads, idempotent handlers, retries with backoff and dead-letter queues, timeouts and heartbeats, concurrency and rate limits, transactional enqueue,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.