Back to skill

Security audit

Fortisase Audit

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent FortiSASE audit guide, but it should go to Review because it normalizes handling reusable FortiCloud and FortiGate administrator credentials without adequate safeguards.

Install only if operators will use dedicated read-only service accounts or scoped API tokens, keep all tokens and passwords out of prompts, logs, command history, and reports, and avoid direct FortiGate administrator authentication unless it is strictly necessary and locked down with least privilege and trusted-host controls.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:64
Finding

FortiCloud password-based authentication exposes reusable account credentials

Content
View full analysis
", "password": "", "client_id": "", "grant_type": "password" } ``` ### Technical Analysis The skill declares `FORTISASE_API_TOKEN` as its required secret and describes read-only access as a prerequisite, but its main procedure instructs the operator or agent to handle a reusable FortiCloud username and password through the OAuth resource-owner password grant. Although the example contains placeholders rather than hardcoded credentials, following these instructions would place the real password in an agent-generated HTTP request body. Depending on the execution environment, sensitive request data could be retained in conversation records, tracing systems, debug logs, proxy logs, terminal history, or error reports. A reusable account password has a substantially larger security scope than a dedicated, revocable, read-only API token. It can also be usable outside the intended audit workflow and may grant access to other FortiCloud resources according to the account's IAM roles. ### Attack Path 1. An operator loads the skill and follows the documented authentication procedure. 2. The operator provides a FortiCloud username, password, and client identifier to the agent or an agent-controlled request tool. 3. The request body or surrounding execution context is retained in a prompt transcript, request trace, debug log, proxy log, or error report. 4. An attacker or unauthorized user obtains access to that retained record. 5. The attacker extracts the reusable FortiCloud credentials. 6. The attacker authenticates as the affected account and accesses FortiSASE or ...[truncated 861 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/api-reference.md:315
Finding

Direct thin-edge authentication requires reusable device administrator credentials

Content
View full analysis
/api/v2/authentication Content-Type: application/json { "username": "", "secretkey": "" } Response includes a session cookie or API token for subsequent requests. ``` ### Technical Analysis The reference instructs the agent to authenticate directly to a thin-edge FortiGate by handling an administrator username and password. This conflicts with the least-privilege posture expected of a read-only audit and expands secret handling beyond the declared `FORTISASE_API_TOKEN`. Even though HTTPS protects the credential in transit when certificate validation is correctly enforced, it does not prevent exposure through the agent context, request tracing, debugging output, local logs, proxy inspection, or error reporting. Device administrator passwords are reusable secrets and may permit configuration changes, unlike a narrowly scoped monitoring token. The instructions also do not require: - A read-only FortiGate administrator profile - A dedicated REST API administrator - Trusted-host restrictions - Token expiration or rotation - TLS certificate validation - Secret redaction from logs Consequently, an operator may use a full administrator account for a task that only needs read access. ### Attack Path 1. The operator performs a thin-edge policy consistency or status check using the documented direct-authentication method. 2. A FortiGate administrator username and password are supplied to the agent or request tool. 3. The request body or execution context is captured in a transcript, debug trace, terminal record, proxy log, or error report. 4. An attacker with access to the captured data obtains the reusable devic ...[truncated 1174 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

S server address, ZTNA tag definitions, compliance rule sets, and endpoint group assignments

  • FortiGuard subscription status — which services are licensed (FortiGuard AV, IPS, Web Filter, Application Control, DNS Filter, Inline CASB, DLP)
  • Knowledge of expected SWG and ZTNA policy baselines for comparison against current configuration
  • Network diagram or inventory showing thin edge FortiGate models, firmware targets, and SD-WAN SLA definitions

Procedure

Follow this audit flow sequentially. Each step builds on prior findings. The procedure moves from tenant discovery through SWG policy analysis, ZTNA assessment, firewall policy review, thin edge validation, SSL inspection, endpoint compliance, FortiGuard health, and logging infrastructure.

Step 1: Tenant and Topology Discovery

Authenticate to the FortiSASE API via FortiCloud IAM and enumerate the tenant topology.

text
# Authenticate to FortiCloud and obtain bearer token
POST https://customerapiauth.fortinet.com/api/v1/oa

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

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

md
finding.
- **SD-WAN overlay configuration:** Review SD-WAN SLA definitions (latency,
  jitter, packet loss thresholds). Verify health-check targets are reachable
  and meaningful. Check that SLA violation failover does not bypass security
  inspection.
- **Security policy consistency:** Compare the thin edge local firewall policy
  with the FortiSASE cloud policy. Identify discrepancies where thin edge

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill explicitly requires an API token and discusses privileged tenant audit access, but it does not include prominent handling guidance for secrets or warnings about exposing sensitive tenant configuration data. In a real agent workflow, this increases the chance that operators paste credentials into prompts, logs, shell history, or transcripts, leading to credential leakage and unintended disclosure of security posture data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The authentication example uses direct username/password submission to obtain a bearer token without cautioning against interactive credential use, logging, or shell/history exposure. This normalizes unsafe secret handling and can cause compromise of FortiCloud credentials or session tokens if copied into tools, transcripts, or debug output.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation provides concrete authentication request/response examples containing usernames, passwords, access tokens, and refresh tokens without any warning to treat them as secrets, avoid logging them, or use safer auth flows. In an audit skill that programmatically accesses tenant security posture and policy data, this can normalize unsafe credential handling and lead operators or downstream agents to expose high-value tokens in code, transcripts, or logs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The direct thin-edge authentication section instructs use of privileged FortiGate admin credentials and session tokens but omits safeguards around credential minimization, token storage, session invalidation, and restricting management-plane access. Because these are direct device admin interfaces, mishandling can expose control of edge firewalls, enabling policy tampering, lateral movement, or persistent compromise.

Content

No source excerpt is available for this finding.