本文へ移動
cccskills
無料GitHub で公開

agent-security-review

Pre-production security checklist for Agentforce deployments: agent run-as permission scope, grounding-source data classification, action write-scope, audit trail. NOT for the full go-live readiness gate covering cost telemetry, rate limits, rollout and rollback — use agentforce/agentforce-production-readiness-checklist. NOT for a general org security review — use security/security-health-check.

インストール方法を見る

含まれるファイル(8)

  • SKILL.md6.7 KB
  • references/examples.md5.4 KB
  • references/gotchas.md9.5 KB
  • references/llm-anti-patterns.md9.1 KB
  • references/metadata-examples.md9.3 KB
  • references/well-architected.md4.3 KB
  • scripts/check_agent_security_review.py928 B
  • templates/agent-security-review-template.md544 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Agent Security Review

Agentforce agents touch user PII, internal data, and external APIs with the permissions of whatever user invokes them. A structured review covers four axes: (1) least-privilege user, (2) data classification of every grounding source, (3) action write-scope, (4) audit trail completeness.

Questions to Ask Before Configuring

Ask these before the review starts. Each one traces to a gotcha in references/gotchas.md.

QuestionWhy it mattersWhat a good answer addsWhat proper configuration adds over just doing it
"Which user does each agent run as, and who else can open it?"The agent user determines access; employee-agent access is a permission that drifts (Gotchas 1, 11)The agent user, its permission sets, and the groups granted agentAccessesAccess that is provably narrow, re-checked by query each release
"Which fields are regulated, and does any grounding path select them?"Trust Layer masking is disabled for agents, so exclusion is the only control (Gotcha 4)A regulated-field list checked against field permissions and selector projectionsA guarantee that no prompt can contain those values
"Which subagents act on a customer's own records, and how is the customer verified?"Without rule expressions, unverified users reach those subagents (Gotcha 7)The verification action, its variable, and the gated subagentsIdentity checks enforced by the planner, not by instructions
"What API version is each action class, and does it declare sharing and access mode?"API 67.0 changed the defaults (Gotcha 5)A table of class, version, sharing keyword and access modeConsistent enforcement that does not depend on save version
"What must be kept for audit, for how long, and how is it deleted?"Builder event logs last 7 days; audit data holds full prompts and responses (Gotcha 2)A retention and deletion decision per data classAnswerable incident and subject-access requests
"Which retrievers and data spaces does the agent use?"Retriever access follows Data Cloud permissions, not CRM sharing (Gotcha 8)The retriever list with its permission sets and data-category scopingGrounding that cannot surface content the CRM model hides

Recommended Workflow

  1. Export the agent: subagent instructions (subagents were called topics before April 2026), Invocable actions, grounding DMOs/sObjects, channel configs. Checksum and archive.
  2. Map the agent's run-as user to a dedicated permission set; verify no profile-level permissions leak through.
  3. Classify every grounding source: public, internal, confidential, regulated. Keep confidential and regulated fields out of the agent user's field permissions and out of every grounding selector. Trust Layer data masking is disabled for agents, so it is not a control here (Generative AI guide, Trust and Agents; this corrects the earlier instruction to mask at the Trust Layer).
  4. Enumerate Invocable write scope: which sObjects/fields can be created/updated/deleted. Apply FLS + CRUD checks in Apex; tighten or split the user. Record each action class's API version, because API 67.0 changed the default access mode and sharing behaviour. Confirm sensitive subagents are gated by rule expressions in the planner bundle (references/metadata-examples.md, Example 4).
  5. Verify audit trail: every Invocable logs to a custom audit object you define (for example Agent_Audit__c); generative AI audit data collection is on if prompts and responses must be kept, and its deletion path is documented; where Event Monitoring is licensed, EventLogFile data (ApexExecution, ContentTransfer) is retrieved into the SIEM.
  6. Store the evidence: the permission sets, the effective-access query results and the planner-bundle findings live beside the agent metadata so the next review is a diff.

Key Considerations

  • Service agents run as their agent user, which "determines what your agent can access and do" (Generative AI guide). UNVERIFIED (2026-10-03): the earlier statement that the default run-as is the invoking user; it may describe employee agents, which the guide says act on behalf of users. Either way, review the identity that actually executes each action, and never test with an admin.
  • Data Cloud grounding can pull data the CRM user cannot see: access to retrievers and their data is controlled by Data Cloud permission sets, not CRM sharing. Review data spaces and retriever permissions separately.
  • Invocables bypass with sharing if written as without sharing — audit every action class's sharing declaration.
  • Audit trail must include prompt + response for forensic replay; conversation storage has retention implications (GDPR).

Worked Examples (see references/examples.md)

  • Write-scope tightening — Service agent can 'Update any Case field' via a generic UpdateRecord action.
  • Regulated-field masking — RAG grounding includes Contact.Social_Security_Number__c.

Common Gotchas (see references/gotchas.md)

  • Agent run-as has View All — Agent sees cross-owner records even when user shouldn't.
  • Conversation retention unset — GDPR subject request cannot locate conversation logs.
  • Shield Event Monitoring not streamed — Agent anomaly is invisible to SOC.

Top LLM Anti-Patterns (full list in references/llm-anti-patterns.md)

  • Running the agent as the invoking user by default — privileged reviewers leak permissions upward.
  • Generic 'UpdateRecord' actions — any field becomes attack surface.
  • Skipping DMO classification — grounding becomes a data-leak vector.

Official Sources Used

See references/well-architected.md for the sources read for this revision.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill when writing test-first, behavior-driven acceptance criteria in Given/When/Then format for a Salesforce user story. Covers happy path, edge cases, negative paths, permission boundaries, and data-state preconditions so the AC block can drive UAT scripts and Apex test design downstream. Trigger keywords: given when then, gherkin, behavior driven AC, test first acceptance criteria, scenario outline, BDD acceptance criteria. NOT for the user-story format itself (use admin/user-story-writing-for-salesforce). NOT for UAT script writing (use admin/uat-test-case-design). NOT for Apex test method generation (use agents/test-class-generator). NOT for high-level UAT planning (use admin/uat-and-acceptance-criteria). More triggers: acceptance criteria record, ac_id, req_id on a criterion, artefact under test, negative case for a rule-type requirement, no-match fall-through criterion, oracle for a Then clause, test type apex flow manual, criteria linter, check_ac_format.py, --manifest-dir.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Task and Event objects: polymorphic WhatId/WhoId, Activity object model, ActivityHistory vs OpenActivity, activity timeline customization, bulk task creation, Einstein Activity Capture boundaries. NOT for turning on EAC or calendar sync — use admin/einstein-activity-capture-setup. NOT for Email-to-Case — use admin/case-management-setup. Covers ActivitiesSettings metadata, enableActivities, shared Task/Event custom fields and FLS, TaskStatus value sets, Shared Activities and TaskRelation/EventRelation, recurring and child activities, and partial-success bulk DML on Task.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Design Invocable Apex actions that return deterministic, agent-friendly errors instead of surfacing raw exceptions to the LLM. NOT for authoring the action itself — @InvocableMethod schema, labels, security context — use agentforce/custom-agent-actions-apex. NOT for the Apex tests that force each error branch — use agentforce/agent-action-unit-tests.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Use when designing how an Agentforce agent extracts structured input parameters (slots) from a user's natural-language utterance to invoke an action. Triggers: 'agent extract date from user', 'agent action argument extraction', 'agentforce slot filling', 'agent invocable input mapping', 'agent fails to fill required parameter'. NOT for action authoring (use agentforce/agent-actions) or for prompt-template variable binding (use agentforce/prompt-builder-templates).

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Apex test patterns for @InvocableMethod agent actions: per-reason-code branch coverage, bulk safety, callout mocking, deterministic assertions. NOT for testing whether the agent routes to the right topic or answers well — use agentforce/agent-testing-and-evaluation. NOT for designing the error envelope the tests assert on — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Designing or reviewing Agentforce actions: Flow actions, Apex invocable actions, prompt-template actions, action naming, input and output contracts, confirmation requirements, and safe error behavior. Triggers: 'agent actions', 'build an agent that can look up an order', 'make the agent able to check order status', 'give the agent a capability', 'agent that can retrieve a record', 'flow action for agent', 'agent invocable action', 'action schema design'. NOT for writing the Apex class itself — use agentforce/custom-agent-actions-apex. NOT for the reason_code error envelope that stops an agent retry loop — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

PranavNagrecha のスキルをすべて見る

このスキルの問題を報告する