Back to skill

Security audit

temporal-python-testing

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only Temporal testing skill, but it gives under-scoped guidance for exporting production workflow histories into local and CI environments.

Review this skill carefully before using its replay-testing and CI examples. Prefer sanitized or synthetic histories, require explicit approval before exporting production histories, restrict credentials, prevent history files from entering logs/caches/artifacts, pin dependencies, bind local services to localhost, and treat docker-compose down -v as destructive.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
resources/replay-testing.md:181
Finding

Unsafe Transfer and Storage of Production Workflow Histories in CI

Content
View full analysis
'7 days ago'" ) count = 0 async for workflow in workflows: # Export history history = await workflow.fetch_history() # Save to file filename = f"workflow_histories/{workflo ...[truncated 3041 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
resources/local-setup.md:15
Finding

Mutable and Insufficiently Pinned Third-Party Dependencies

Content
View full analysis
=1.5.0 pytest>=7.4.0 pytest-asyncio>=0.21.0 pytest-cov>=4.1.0 pytest-xdist>=3.3.0 # Parallel test execution ``` ```toml [project] name = "temporal-project" version = "0.1.0" requires-python = ">=3.10" dependencies = [ "temporalio>=1.5.0", ] [project.optional-dependencies] dev = [ "pytest>=7.4.0", "pytest-asyncio>=0.21.0", "pytest-cov>=4.1.0", "pytest-xdist>=3.3.0", ] ``` CI Actions are pinned only to movable major-version tags: ```yaml steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.11" - name: Start Temporal server run: docker-compose up -d - name: Wait for Temporal run: sleep 10 - name: Install dependencies run: | pip install -r requirements.txt - name: Run tests with coverage run: | pytest --cov=src --cov-report=xml --cov-fail-under=80 - name: Upload coverage uses: codecov/codecov-action@v3 with: file: ./coverage.xml ``` The replay workflow similarly uses mutable Action tags: ```yaml steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.11" - name: Install dependencies run: | pip install -r requirements.txt pip install pytest pytest-asyncio - ...[truncated 2426 chars]
Remediation
View remediation
``` 2. Pin GitHub Actions to full commit SHAs rather than major-version tags. 3. Pin exact Python package versions through a reviewed lockfile. 4. Require package hashes with `pip install --require-hashes`. 5. Separate dependency installation from jobs that can access production credentials or histories. 6. Use a network-restricted replay job after all dependencies and images have been resolved and verified. 7. Enable dependency review, container scanning, SBOM generation, and automated update proposals. 8. Require human review for dependency digest, Action SHA, or lockfile changes. 9. Minimize GitHub token permissions with an explicit `permissions:` block. 10. Avoid exposing secrets to third-party Actions unless strictly necessary. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
resources/local-setup.md:11
Finding

Development Services Exposed on All Host Interfaces with Default Database Credentials

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document includes docker-compose down -v as a reset step, which deletes Docker volumes and can erase local PostgreSQL/Temporal state. In a local setup guide this is not inherently malicious, but presenting the command without an explicit warning increases the chance of accidental data loss, especially if users adapt the compose file for non-ephemeral development data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The clean Makefile target combines docker-compose down -v with removal of .pytest_cache, htmlcov, and .coverage, causing irreversible deletion of local test artifacts and persisted container data. Because make clean is a common, easy-to-run command, users may trigger broader deletion than expected if the target is not clearly documented as destructive.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · resources/replay-testing.md (reported line 123)May include surrounding context.

md
class BadWorkflow:
    @workflow.run
    async def run(self) -> dict:
        response = requests.get("https://api.example.com/data")  # External call!
        return response.json()

# ✅ Deterministic

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guidance explicitly exports and stores production workflow histories to local files without warning that Temporal histories may contain workflow inputs, results, arguments, and other sensitive business data. In a testing skill, this can normalize unsafe handling of production data and lead to accidental retention, developer workstation exposure, or onward sharing in source trees, backups, or CI systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The CI example automates downloading production workflow histories onto shared CI runners and then uploads failure artifacts, but provides no warning about exposing production data in CI logs, workspaces, caches, or artifacts. In this context, replay data is more dangerous because CI environments often have broader access surfaces and longer-lived artifact retention than local development.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The example trigger "How do I mock activities?" is a generic natural-language request rather than a narrowly scoped invocation cue. In isolation, it could overlap with everyday conversation and does not include explicit constraints or exclusion conditions for when this skill should be selected.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.