Skip to main content

Overview

OWASP Nest uses Django RQ (Redis Queue) for running background tasks outside the request/response cycle. A dedicated nest-worker container processes jobs from the ai queue, backed by Redis. The RQ queue is configured in settings/base.py:
RQ_QUEUES = {
    "ai": {
        "HOST": REDIS_HOST,
        "PORT": 6379,
        "PASSWORD": REDIS_PASSWORD,
        "DB": 1,
        "DEFAULT_TIMEOUT": 300,
    }
}

Background tasks

Long-running data pipeline operations are executed as management commands and are typically triggered via Makefile targets or scheduled jobs in production.

GitHub data sync

CommandDescription
github_update_owasp_organizationSyncs all repositories and metadata for the OWASP GitHub organization.
github_update_related_organizationsSyncs OWASP-related GitHub organizations.
github_enrich_issuesEnriches GitHub issues with labels, assignees, and linked pull requests.
github_update_pull_requestsLinks pull requests to issues using closing keywords.
github_update_usersUpdates GitHub user profiles.
github_add_related_repositoriesDiscovers and links OWASP-related repositories.

OWASP data pipeline

CommandDescription
owasp_scrape_chaptersScrapes chapter data from the OWASP website.
owasp_scrape_projectsScrapes project data from the OWASP website.
owasp_scrape_committeesScrapes committee data from the OWASP website.
owasp_enrich_chaptersEnriches chapter records with additional metadata.
owasp_enrich_projectsEnriches project records with additional metadata.
owasp_enrich_committeesEnriches committee records.
owasp_enrich_eventsEnriches event records.
owasp_aggregate_projectsAggregates project statistics.
owasp_aggregate_entity_contributionsAggregates contribution statistics for chapters and projects.
owasp_aggregate_member_contributionsAggregates community member contribution statistics.
owasp_process_snapshotsProcesses periodic community snapshots.
owasp_update_project_health_metricsUpdates project health metric values.
owasp_update_project_health_scoresRecalculates project health scores.

AI generation

CommandDescription
ai_update_project_chunksGenerates text chunks from project content for vector search.
ai_update_project_contextGenerates AI context summaries for projects.
ai_update_chapter_chunksGenerates text chunks from chapter content.
ai_update_chapter_contextGenerates AI context summaries for chapters.
ai_update_repository_chunksGenerates text chunks from repository content.
ai_update_repository_contextGenerates AI context summaries for repositories.
ai_update_slack_message_chunksGenerates text chunks from Slack messages.
ai_run_agentic_ragRuns the LangGraph agentic RAG pipeline.

Triggering tasks locally

All tasks are wrapped as Makefile targets. With the stack running, execute any task from the repository root:
# Run the full data sync pipeline
make sync-data

# Run individual steps
make github-update-owasp-organization
make owasp-scrape-projects
make owasp-enrich-projects
make index-data
To run a management command directly inside the backend container:
docker exec -it nest-backend python manage.py <command_name>

Monitoring the queue

Django RQ ships with a built-in admin dashboard. After creating a superuser, navigate to /admin/ and look for the Django RQ section to inspect queued, running, and failed jobs.
Failed jobs are stored in Redis and can be retried from the Django admin interface without re-running the originating management command.

Build docs developers (and LLMs) love