sf-2gp-security-review
Skill15 starsChanged 7 months agoMITView on GitHub
Use when user asks for a 2GP security review, AppExchange readiness check, or pass/fail prediction for Apex, LWC, SOQL. Do NOT use for general security patterns.
In this repository58 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- asideSkill
- checkpointSkill
- configure-sccSkill
- continuous-agent-loopSkill
- mcp-server-patternsSkill
- model-routeSkill
- prompt-optimizerSkill
- refactor-cleanSkill
- resume-sessionSkill
- save-sessionSkill
- search-firstSkill
- security-scanSkill
- sessionsSkill
- sf-agentforce-developmentSkill
- sf-agentforce-mcp-actionsSkill
- sf-apex-async-patternsSkill
- sf-apex-best-practicesSkill
- sf-apex-constraintsSkill
- sf-apex-cursorSkill
- sf-apex-enterprise-patternsSkill
- sf-apex-testingSkill
- sf-api-designSkill
- sf-approval-processesSkill
- sf-aura-developmentSkill
- sf-build-fixSkill
- sf-cli-referenceSkill
- sf-data-modelingSkill
- sf-debuggingSkill
- sf-deployment-constraintsSkill
- sf-deploymentSkill
- sf-devops-ci-cdSkill
- sf-docs-lookupSkill
- sf-e2e-testingSkill
- sf-experience-cloudSkill
- sf-flow-developmentSkill
- sf-governor-limitsSkill
- sf-harness-auditSkill
- sf-helpSkill
- sf-integrationSkill
- sf-lwc-constraintsSkill
- sf-lwc-developmentSkill
- sf-lwc-testingSkill
- sf-metadata-managementSkill
- sf-platform-events-cdcSkill
- sf-quickstartSkill
- sf-security-constraintsSkill
- sf-securitySkill
- sf-soql-constraintsSkill
- sf-soql-optimizationSkill
- sf-tdd-workflowSkill
- sf-testing-constraintsSkill
- sf-trigger-constraintsSkill
- sf-trigger-frameworksSkill
- sf-visualforce-developmentSkill
- strategic-compactSkill
- update-docsSkill
- update-platform-docsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
When invoked, you will:
- Distinctive: line 25
Audit: every file against the security review criteria below
- Very specific: line 35
Before auditing, build a complete inventory of the package contents.
- Distinctive: line 98
After the security audit, assess readiness for 2GP licensing and AppExchange distribution.
- Distinctive: line 99
Check every item and mark as DONE, NOT DONE, or N/A.
- Distinctive: line 109
After completing the audit and checklist, calculate the overall score using the scoring rules and produce one of these verdicts: READY TO …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Salesforce 2GP Managed Package Security Review
When to Use
- User asks for a 2GP managed package security review or AppExchange readiness assessment
- User wants a pass/fail prediction for their managed package security review submission
- User needs a 2GP license qualification checklist or submission readiness scoring
This skill performs a comprehensive security review of a Salesforce 2GP managed package, assesses readiness for AppExchange security review, and produces a pass/fail prediction with actionable remediation steps.
How This Skill Works
When invoked, you will:
- Discover the package structure (scan for Apex, LWC, objects, permissions, config)
- Audit every file against the security review criteria below
- Score each category (PASS / WARN / FAIL)
- Produce a structured report with an overall pass/fail prediction and remediation plan
The output is a detailed markdown report saved to the project's docs/security/ directory.
Step 1 — Package Discovery
Before auditing, build a complete inventory of the package contents. Run these searches
against the project's force-app/ directory:
Apex classes: force-app/**/classes/*.cls
Apex triggers: force-app/**/triggers/*.trigger
LWC components: force-app/**/lwc/*/
Aura components: force-app/**/aura/*/
Visualforce pages: force-app/**/pages/*.page
Custom objects: force-app/**/objects/*/
Permission sets: force-app/**/permissionsets/*/
Custom metadata: force-app/**/customMetadata/*/
Static resources: force-app/**/staticresources/*/
Named credentials: force-app/**/namedCredentials/*/
Remote site settings: force-app/**/remoteSiteSettings/*/
Connected apps: force-app/**/connectedApps/*/Record the count of each metadata type. This inventory becomes the header of your report.
Step 2 — Security Audit Categories
Audit every file from Step 1 against 15 categories. For each category, assign a status: PASS (no issues), WARN (minor issues, unlikely to fail review), or FAIL (will likely fail AppExchange security review).
Audit criteria, grep patterns, and PASS/WARN/FAIL thresholds for all 15 categories:
@../_reference/APPEXCHANGE_REVIEW.md
Supporting reference for implementation patterns:
- CRUD/FLS, sharing, injection, XSS, Named Credentials: @../_reference/SECURITY_PATTERNS.md
- Sharing model details: @../_reference/SHARING_MODEL.md
- Testing standards and annotations: @../_reference/TESTING_STANDARDS.md
- Namespace, versioning, package CLI: @../_reference/PACKAGE_DEVELOPMENT.md
- Governor limits and anti-patterns: @../_reference/GOVERNOR_LIMITS.md
- LWC lifecycle and patterns: @../_reference/LWC_PATTERNS.md
Categories:
- CRUD/FLS Enforcement (CRITICAL — #1 failure reason)
- Sharing Model Enforcement
- SOQL/DML Injection Prevention
- Sensitive Data Exposure
- XSS and Content Security Policy
- External Callout Security
- Third-Party Library Vulnerabilities
- Code Coverage
- Namespace and Packaging Compliance
- Permission Model
- Governor Limit Safety
- Lightning Web Security (LWS) Compliance
- Connected App and OAuth Configuration
- Data at Rest and in Transit
- Documentation and Submission Readiness
Step 3 — 2GP License Qualification Checklist
After the security audit, assess readiness for 2GP licensing and AppExchange distribution. Check every item and mark as DONE, NOT DONE, or N/A.
Full checklist (Dev Hub, package config, code quality, submission, ISV, post-review):
@../_reference/APPEXCHANGE_REVIEW.md (section: 2GP License Qualification Checklist)
Step 4 — Pass/Fail Prediction
After completing the audit and checklist, calculate the overall score using the scoring rules and produce one of these verdicts: READY TO SUBMIT / NEEDS REMEDIATION / MAJOR REWORK NEEDED.
Scoring rules and verdict criteria:
@../_reference/APPEXCHANGE_REVIEW.md (section: Scoring Rules)
Step 5 — Report Output
Generate a markdown report with this structure and save it to docs/security/security-review-report.md:
# Security Review Report — [Package Name]
Generated: [Date]
Package Version: [version from sfdx-project.json]
Namespace: [namespace]
## Package Inventory
| Metadata Type | Count |
|--------------|-------|
| Apex Classes | X |
| ... | ... |
## Security Audit Results
### Overall Verdict: [READY TO SUBMIT / NEEDS REMEDIATION / MAJOR REWORK]
Score: X/15 categories passing
### Category Results
| # | Category | Status | Issues |
|---|----------|--------|--------|
| 1 | CRUD/FLS Enforcement | PASS/WARN/FAIL | Details |
| ... | ... | ... | ... |
### Critical Findings (FAIL)
[List each FAIL with file path, line number, and specific remediation]
### Warnings
[List each WARN with recommendation]
## 2GP License Qualification
[Checklist with DONE/NOT DONE status for each item]
## Remediation Plan
[Prioritized list of fixes, ordered by: automatic fails first, then likely fails, then warnings]
## Appendix: Scanner Commands
[Commands the user should run for Code Analyzer, Checkmarx, etc.]Related
- Scanner commands: @../_reference/APPEXCHANGE_REVIEW.md (section: Scanner Commands)
- Top 20 failures: @../_reference/APPEXCHANGE_REVIEW.md (section: Top 20 Failures)
- 2026 platform changes: @../_reference/APPEXCHANGE_REVIEW.md (section: 2026 Considerations)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

