Back to skill

Security audit

session-closer

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a session journal tool, but it also directs broad logging, repository push, and external notification without clear per-run approval.

Review this skill before installing. It is suitable only if you intentionally want exhaustive session journaling and are comfortable adding your own approval gates. Do not let it run git add -A, git push, external notifications, or workspace Node helper scripts unless you have reviewed the exact files, destination, diff, and payload first.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:87
Finding

Automatic Staging and Remote Push of All Repository Changes Without Approval

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 87–93
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: High

Vulnerable Code:

markdown
### 4. Push active git repo if files were edited

If any version-controlled files were touched this session, commit and push before
closing:

```sh
git add -A && git commit -m "session close sync YYYY-MM-DD" && git push
text

### Technical Analysis

The close procedure directs the agent to stage every tracked and untracked change in the active repository, create a commit, and push it to the configured remote. It does not require explicit owner approval, inspection of the staged diff, validation of the repository and destination branch, secret scanning, or restriction to files modified by the agent during the current task.

The use of `git add -A` is especially unsafe because it includes unrelated changes, deletions, newly created files, generated artifacts, and potentially sensitive files. This behavior exceeds the permissions required to create a local session journal and may mutate a shared remote repository without authorization.

The instruction also conflicts with the safer behavioral rule documented in `references/pattern-keys.md`, which tracks whether the agent avoided committing to a shared repository without owner approval.

### Attack Path

1. A repository or another local process introduces a sensitive, malicious, unfinished, or unrelated file into the working tree.
2. The user or agent triggers the session-close procedure.
3. The Skill executes `git add -A`, staging the entire working tree rather than an explicit set of reviewed files.
4. The Skill creates a commit without presenting the staged changes for approval.
5. `git push` publishes the commit to the repository's configured remote and branch.
6. The staged material becomes available to remote collaborators or downstream automation and
...[truncated 560 chars]
Remediation
View remediation

Remediation Suggestions

  • Make committing and pushing opt-in rather than a mandatory close step.
  • Obtain explicit user approval immediately before both the commit and the push.
  • Display the repository root, current branch, destination remote, and complete staged diff before requesting approval.
  • Replace git add -A with explicit staging of an allowlisted set of files created or intentionally modified during the session.
  • Check for untracked files, unrelated pre-existing changes, submodules, symlinks, and unexpected repository boundaries.
  • Run an approved secret scanner before committing and block the operation when credentials or sensitive material are detected.
  • Do not push directly to protected or shared branches; use a user-approved branch or pull-request workflow.
  • Separate local journaling from repository publication so the session can close safely without remote write access.

other

Warning
Location
SKILL.md:32
Finding

Persistent Collection and External Disclosure of Sensitive Session Metadata

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 32–40 and 95–103; references/journal-format.md, lines 18–20
Vulnerability Type: other: Sensitive Session Metadata Disclosure
Risk Level: Medium

Vulnerable Code:

markdown
### 1. Gather the full file surface

Before writing anything, collect:
- **Files Read** — every file opened this session, including startup files
- **Files Written/Edited** — every file created or modified
- **External APIs** — every external call fired (GitHub, CMS APIs, image/model APIs,
  messaging platforms, anything that left the session)

Do not sample. All of them.
markdown
### 5. Send close summary to your configured push channel

Session closed: [one-line summary] Files Read: [count] | Written: [count] | External: [list] Delta: [self-caught failure]

text

Send this to whatever channel you use to hear from your agent — a chat platform, a
push notification, a log the user checks. The content is fixed; the destination is
whatever your setup already uses.
markdown
## Files Accessed
Every file touched this session — read, written, or both. No sampling; if it was
touched, it's listed.

Technical Analysis

The Skill requires exhaustive collection of filenames, file-access activity, external API usage, decisions, and behavioral assessments. It persists this information in a journal and requires part of it to be sent to a configured external push channel.

Filenames and external-service identifiers can disclose usernames, customer or project names, infrastructure details, secret locations, internal repository structure, and the nature of confidential work. The instructions provide no requirements for data minimization, redaction, consent, retention limits, access controls, destination validation, or secure transport. The destination is described generically, so the Skill does not ensure that the selected channel is authorized ...[truncated 1424 chars]

Remediation
View remediation

Remediation Suggestions

  • Make external notifications optional and disabled by default.
  • Require explicit confirmation of both the destination and the exact payload before transmission.
  • Record only metadata necessary for the user-approved purpose rather than every touched file and external call.
  • Replace absolute paths with repository-relative or redacted identifiers.
  • Remove usernames, tokens, query strings, customer names, secret-like filenames, and sensitive API parameters.
  • Classify the destination channel and prohibit transmission to public or untrusted endpoints.
  • Apply restrictive permissions to journal files and define retention and deletion controls.
  • Allow users to exclude sensitive directories, files, services, and sessions from journaling.
  • Clearly separate locally retained details from the smaller, sanitized external summary.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:59
Finding

Execution of Unverified Workspace-Controlled Scripts

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 59–80
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Medium

Vulnerable Code:

markdown
If your workspace has `scripts/journal-writer.js`, you can use it to write the same
fields from the CLI instead of writing the file by hand:

node scripts/journal-writer.js --summary "..." --delta "..." --fingerprint "..."

text

This is acceleration, not a requirement. The manual path always works and needs
nothing beyond a text editor — treat the script as a shortcut for workspaces that
have it, not as infrastructure the close sequence depends on.

### 3. Run pattern-update (if applicable)

Pattern tracking is a system where you define recurring behaviors you want to catch,
assign them keys, and score them pass/fail each session. Over time the scores tell
you whether you're actually improving or just claiming you are. If your workspace
doesn't track patterns yet, skip this step entirely — it's an optional layer, not a
requirement for a valid close.

If your workspace tracks recurring behavioral patterns and has
`scripts/pattern-update.js`, run it after the journal is written:

node scripts/pattern-update.js --passed "key1,key2" --failed "key3"
--session-summary memory/journal/YYYY-MM-DD.md

text

Technical Analysis

The Skill permits execution of JavaScript files based primarily on their presence at predictable paths inside the current workspace. It does not require source inspection, provenance validation, integrity verification, ownership checks, symlink checks, or explicit user approval before execution.

A repository controls its own workspace contents and can therefore supply malicious implementations of scripts/journal-writer.js or scripts/pattern-update.js. Running either file with Node grants it the same filesystem, environment-variable, network, and subprocess permissions available to the a ...[truncated 1553 chars]

Remediation
View remediation

Remediation Suggestions

  • Preserve manual journal writing as the default and avoid executing repository-controlled helper scripts.
  • Require explicit user approval after displaying the script path, purpose, and relevant source code.
  • Execute only scripts from a trusted, administrator-controlled directory outside the untrusted repository.
  • Verify scripts against an approved cryptographic hash or signed manifest.
  • Resolve canonical paths and reject symlinks, path traversal, non-regular files, and files with unexpected ownership or permissions.
  • Run approved helper scripts in a restricted sandbox with minimal filesystem, environment, network, and subprocess access.
  • Remove unnecessary secrets from the child process environment.
  • Invoke Node through a process API with a fixed executable and argument array; never interpolate journal text into a shell command.
  • Validate and length-limit all summary, delta, fingerprint, key, and path arguments.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Automatically directing git add -A && git commit ... && git push can publish unrelated modified files, secrets, or partial work to a remote repository. For a journaling-oriented skill, this is an unjustified privileged action that can exfiltrate data and alter source control state without explicit per-run approval.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The close-summary step explicitly transmits session details, including activity counts/lists and a failure delta, to an external channel. This is a direct data exfiltration path that can leak sensitive project structure, user behavior, or confidential operational information to third-party systems.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 116)May include surrounding context.

md
- **Files Read** → context files, `SKILL.md`s, any reference material loaded into

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description includes broad trigger phrases such as 'log this' and 'close out,' which can match ordinary conversation and invoke a skill with write and network side effects unintentionally. Because this skill can persist data and trigger outbound actions, ambiguous invocation increases the chance of accidental execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The 'When to Run' section adds ambiguous conditions like 'wrap it up,' 'session energy drops,' and token-trigger execution, which lack clear operational boundaries. This raises the risk that the agent will run the skill autonomously or on vague user language, leading to unwanted journaling, commits, or notifications.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill requires collecting the full file surface and all external API activity, which can aggregate sensitive workspace metadata, filenames, operational details, and potentially confidential context into one place. Even if intended for accountability, comprehensive collection increases the blast radius if the journal or summary is later exposed.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The journal-writing step durably stores summaries, mistakes, and behavioral fingerprints, which may preserve sensitive user content or internal operational details longer than necessary. Persistent logs are especially risky when the format encourages specificity and complete session accounting.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill’s declared purpose is end-of-session journaling and pattern tracking, but it also instructs the agent to commit/push repository changes and send a notification to an external channel. Those extra side effects materially expand the trust boundary and can cause unreviewed code/data transmission beyond what a user would reasonably expect from a journaling skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs modifying repository state and transmitting data to a remote git server without warning the user about what files may be included or the consequences of publication. In combination with git add -A, this can capture far more than the journal entry and create irreversible disclosure or workflow disruption.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs sending a session summary, file activity, and failure notes to an arbitrary configured push channel. That creates an outbound data flow to destinations outside the workspace with little constraint on destination, content minimization, or user awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs sending session details externally without surfacing privacy risks, retention concerns, or the possibility that file names, APIs used, and failure summaries may contain sensitive information. Users may not realize that a 'close summary' includes outbound disclosure beyond local journaling.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/journal-format.md (reported line 50)May include surrounding context.

md
have skipped error handling, and the user agreed to do it properly instead.

## One Thing I'd Do Differently
Assumed the test suite already covered the empty-state case without checking first —
it didn't, and the bug reached staging before being caught in manual review. Should
have grepped for existing test coverage before assuming it existed.

Static analysis

No suspicious patterns detected.