Skip to content

AppExchange Release

This content is for the 1.0 version. Switch to the latest version for up-to-date documentation.

Run these before touching the org. Fix everything that comes up.

1.1 Salesforce Code Analyzer v5 — full scan

Section titled “1.1 Salesforce Code Analyzer v5 — full scan”
Terminal window
# Install (once)
sf plugins install @salesforce/plugin-code-analyzer
# Run ALL rules (PMD, ESLint, RetireJS, Regex, Flow, CPD)
sf code-analyzer run \
--workspace force-app \
--output-file docs/scan-results.html
# Run AppExchange-specific rules
sf code-analyzer run \
--rule-selector AppExchange \
--workspace force-app \
--output-file docs/scan-appexchange.html
# Run only Security-tagged rules
sf code-analyzer run \
--rule-selector Security \
--workspace force-app \
--output-file docs/scan-security.html
# Severity threshold — fail on High or Critical (CI/CD)
sf code-analyzer run \
--rule-selector AppExchange \
--workspace force-app \
--severity-threshold 2 \
--output-file docs/scan-appexchange.html

Zero tolerance on: Critical (1) and High (2). Medium (3) and below — document as false positives in docs/FALSE-POSITIVES.md.

Terminal window
npm run lint
Terminal window
npm run test:unit
Terminal window
sf apex run test \
--code-coverage \
--result-format human \
--wait 10 \
--target-org FlexiFREE

Required: >= 75% overall coverage, every trigger must have coverage.

Terminal window
sf apex run test \
--code-coverage \
--result-format json \
--wait 10 \
--target-org FlexiFREE \
| jq '.result.coverage.coverage[]
| select(.coveredPercent < 75)
| {name, coveredPercent}'
"versionName": "ver 1.2.0",
"versionNumber": "1.2.0.NEXT"
Terminal window
sf package version create \
--package FlexibleTeamShare \
--definition-file config/package-scratch-def.json \
--installation-key-bypass \
--wait 30 \
--code-coverage \
--skip-ancestor-check
Terminal window
sf package version list --packages FlexibleTeamShare --order-by CreatedDate --verbose
sf package version report --package 04tXXXXXXXXXXXXXXX --verbose

4.1 Install in a clean scratch/sandbox org

Section titled “4.1 Install in a clean scratch/sandbox org”
Terminal window
sf package install \
--package 04tXXXXXXXXXXXXXXX \
--target-org TestOrg \
--wait 10
  • Assign FTS_App_Access and FTS_Data_Access permission sets
  • Configure a sharing config via the Wizard
  • Add/edit/remove team members on a record
  • Verify sharing records created/deleted
  • Test as non-admin user (FTS_Data_Access only)
Terminal window
sf package version promote --package 04tXXXXXXXXXXXXXXX

Phase 6: Partner Security Portal — Source Scanner (Checkmarx)

Section titled “Phase 6: Partner Security Portal — Source Scanner (Checkmarx)”

This is mandatory for any submission that includes a Salesforce package.

  1. Go to Partner Security Portal using your DevHub/packaging org credentials
  2. Select your promoted (released) package version
  3. Click Start Scan and wait for results (usually 15-30 min)
  4. Download the report
  • Critical/High — fix the code, rebuild, rescan
  • False positives — document in docs/FALSE-POSITIVES.md, attach to submission
  • Low/Info — document rationale, no fix required

Flexible Team Share has no external callouts, no web UI, no API endpoints — DAST is not applicable.

MaterialFileNotes
Code Analyzer report (full)docs/scan-results.htmlFrom Phase 1
Code Analyzer report (AppExchange)docs/scan-appexchange.htmlFrom Phase 1
Source Scanner reportDownloaded from PortalFrom Phase 6
False positives docdocs/FALSE-POSITIVES.mdExplain each finding
Admin/User documentationdocs/APPLICATION-OVERVIEW.md, docs/USE-CASES.mdReviewers test your app
Installation guidedocs/1. Installation Guide.mdStep-by-step setup
  • Install the promoted package version
  • Disable MFA/2FA so the review team can log in
  • Only install packages related to this review
  • Create a test user with full access for the review team
  • Pre-configure at least one working sharing config with sample data
  1. Go to AppExchange Partner Console > Publishing > Security Review
  2. Select your package and promoted version
  3. Upload all scan reports
  4. Provide org login credentials for the review team
  5. Pay $999 fee (for paid apps; free apps — no fee)
  6. Submit

Timeline: 4-6 weeks. Most apps pass on 2nd attempt.

Phase 1 Code Analyzer + ESLint + Jest ← fix code issues
Phase 2 Apex tests in org (>= 75%) ← fix coverage gaps
Phase 3 Build beta package version ← if build fails, back to Phase 2
Phase 4 Install & smoke test in clean org ← if broken, fix and rebuild
Phase 5 Promote to release ← IRREVERSIBLE
Phase 6 Source Scanner (Checkmarx) ← only on promoted version
Phase 7 DAST scan (if applicable) ← N/A for this app
Phase 8 Prepare docs & review org ← package everything
Phase 9 Submit to AppExchange ← wait 4-6 weeks