1 必要など申請資料の確認
https://checklistbuilder.herokuapp.com/ ※外部公式API利用してる場合も、そのAPIのセキュリティチェックも必要のようです。 ① Force.com Source Code (Checkmarx) Scanner Results Partnerではなくても、だれでも以下すぐにでチェックし、レポートの取得可能です。 https://security.secure.force.com/security/tools/forcecom/scanner
※パートナーでも登録申請してからチェック可能まで数日かかります。
➁ Web Application Vulnerability Scanner Results OWASP ZAP をインストールする PostManインストールする。
以下を設定する。
※PostManにて、APIを呼び出してから、OWASP ZAPに追加されることになります。
2 パッケージを含む組織 と接続してリストを作成、セキュリティ依頼する
第二世代管理パッケージの場合は、Dev Hub 組織を接続します。
また、以下のコマンド最後まで実行しないと、DevHubに接続しても表示されません。
1 sfdx auth:web:login -d -a DevHub
2 sfdx config:set defaultdevhubusername=DevHub
3 sfdx force:org:create -f config/project-scratch-def.json -a [組織アライアンス名] -s -d30
sfdx force:source:push
sfdx force:org:open → 動作確認して、問題なければ、以下で管理パッケージを作成する
4 sfdx force:package:create --name [パッケージ名] --path force-app --packagetype Managed
5 sfdx force:package:version:create --package [No4 生成したパッケージID] --definitionfile config/project-scratch-def.json --codecoverage --installationkeybypass --wait 10
6 sfdx force:package:version:promote -p [No5 生成したバージョンID]
注意点:
・プロファイルを利用せず、権限セットで利用すること。
・参照ソース維持するスクラッチ組織と開発組織分けること。
(不要な変更パッケージから除外するため)
以下を利用して、不要な内容をパッケージから除外
.forceignore
package.xml
# LWC configuration files
**/jsconfig.json
**/.eslintrc.json
# LWC Jest
**/__tests__/**
**/profiles/**
**/AppSwitcher**
**/testSuites**
**/*SessionSetting*
**/*PasswordPolicy*
*SessionSetting*
*PasswordPolicy*
project-scratch-def.json
{
"orgName": "better-future Co. Ltd",
"edition": "Partner Developer",
"features": ["DebugApex"],
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
},
"mobileSettings": {
"enableS1EncryptedStoragePref2": false
}
}
}
検証スクラッチ組織作成
{
"orgName": "Demo company",
"edition": "Enterprise",
"features": [],
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
},
"securitySettings": {
"passwordPolicies": {
"enableSetPasswordInApi": true
}
},
"mobileSettings": {
"enableS1EncryptedStoragePref2": false
}
}
}
〇参考資料: https://japan-isv.my.site.com/basecamp/s/appexchange-partner
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
① sfdx-project.json 作成
{
"packageDirectories": [
{
"path": "force-app",
"default": true,
"package": "dxlineapp",
"versionName": "ver 1.0",
"versionNumber": "1.0.0.NEXT"
}
],
"name": "fmlline",
"namespace": "bfml",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "54.0",
"packageAliases": {
"dxlineapp": "xxx",
"dxlineapp@1.0.0-1": "xxx"
}
}
➁環境ハブから、「Enterprise Edition」の環境を作成する。
③ 上記のコマンドで生成したPackgeを上記の環境にインストールする。
/packaging/installPackage.apexp?p0=xxxxxxx
④ Partner Community にログインし、「組織を接続」で上記の環境に接続する
⑤ 「リスト」を作成し、
「リスト」→「アプリ」→「パッケージを選択」 上記作成したパッケージバージョンを選択する。
⑥ セキュリティソースチェック
以下にアクセスする(最初は申請する必要で、少し時間がかかる) https://security.secure.force.com/sourcescanner/PackageScannerMain
以下で、上記選択したパッケージを選択し、セキュリティチェック処理を実施する。
⑦ 実行後、「Download Report 」から結果を取得し、そのままセキュリティーレビューに添付する。