From 7be3a6e3a63984912858585cefb855b3412c9218 Mon Sep 17 00:00:00 2001 From: Josh Feingold Date: Thu, 12 Dec 2024 14:42:07 -0600 Subject: [PATCH] CHANGE @W-17312010@ Adding PMD AppExchange rule docs to keep links functional (#1697) --- pmd-appexchange/docs/AvoidApiSessionId.md | 18 ++++++++++ .../docs/AvoidApiSessionIdInXML.md | 18 ++++++++++ .../docs/AvoidAuraAppWithLockerDisabled.md | 18 ++++++++++ .../docs/AvoidAuraCmpWithLockerDisabled.md | 18 ++++++++++ .../docs/AvoidChangeProtectionUnprotected.md | 18 ++++++++++ .../docs/AvoidCreateElementScriptLinkTag.md | 28 ++++++++++++++++ .../docs/AvoidDisableProtocolSecurity.md | 18 ++++++++++ .../docs/AvoidDisableProtocolSecurityInXML.md | 18 ++++++++++ .../docs/AvoidGetInstanceWithTaint.md | 20 +++++++++++ .../AvoidGlobalInstallUninstallHandlers.md | 23 +++++++++++++ .../docs/AvoidHardCodedCredentialsInAura.md | 18 ++++++++++ .../docs/AvoidHardCodedSecretsInVFAttrs.md | 18 ++++++++++ .../AvoidHardcodedCredentialsInFieldDecls.md | 19 +++++++++++ .../AvoidHardcodedCredentialsInHttpHeader.md | 17 ++++++++++ .../AvoidHardcodedCredentialsInSetPassword.md | 18 ++++++++++ .../AvoidHardcodedCredentialsInVarAssign.md | 23 +++++++++++++ .../AvoidHardcodedCredentialsInVarDecls.md | 19 +++++++++++ .../AvoidInsecureHttpRemoteSiteSetting.md | 18 ++++++++++ ...AvoidInsecureHttpRemoteSiteSettingInXML.md | 18 ++++++++++ .../AvoidInvalidCrudContentDistribution.md | 33 +++++++++++++++++++ .../docs/AvoidJavaScriptCustomObject.md | 18 ++++++++++ .../docs/AvoidJavaScriptHomePageComponent.md | 18 ++++++++++ .../docs/AvoidJavaScriptWeblink.md | 18 ++++++++++ .../docs/AvoidJsLinksInCustomObject.md | 18 ++++++++++ .../docs/AvoidJsLinksInWebLinks.md | 18 ++++++++++ pmd-appexchange/docs/AvoidLmcIsExposedTrue.md | 18 ++++++++++ .../docs/AvoidLmcIsExposedTrueInXML.md | 18 ++++++++++ .../docs/AvoidLwcBubblesComposedTrue.md | 18 ++++++++++ pmd-appexchange/docs/AvoidSControls.md | 18 ++++++++++ .../AvoidSecurityEnforcedOldApiVersion.md | 18 ++++++++++ .../docs/AvoidSystemModeInFlows.md | 18 ++++++++++ .../AvoidUnauthorizedApiSessionIdInApex.md | 18 ++++++++++ .../AvoidUnauthorizedApiSessionIdInFlows.md | 18 ++++++++++ ...voidUnauthorizedApiSessionIdVisualforce.md | 18 ++++++++++ .../AvoidUnauthorizedGetSessionIdInApex.md | 18 ++++++++++ ...idUnauthorizedGetSessionIdInVisualforce.md | 18 ++++++++++ pmd-appexchange/docs/AvoidUnescapedHtml.md | 18 ++++++++++ .../docs/AvoidUnsafePasswordManagementUse.md | 18 ++++++++++ .../docs/LimitConnectedAppScope.md | 19 +++++++++++ pmd-appexchange/docs/LoadCSSApexStylesheet.md | 26 +++++++++++++++ pmd-appexchange/docs/LoadCSSLinkHref.md | 26 +++++++++++++++ .../docs/LoadJavaScriptHtmlScript.md | 26 +++++++++++++++ .../docs/LoadJavaScriptIncludeScript.md | 26 +++++++++++++++ pmd-appexchange/docs/ProtectSensitiveData.md | 16 +++++++++ .../docs/UpgradeLwcLockerSecuritySupport.md | 18 ++++++++++ pmd-appexchange/docs/UseHttpsCallbackUrl.md | 18 ++++++++++ pmd-appexchange/docs/UseLwcDomManual.md | 27 +++++++++++++++ 47 files changed, 924 insertions(+) create mode 100644 pmd-appexchange/docs/AvoidApiSessionId.md create mode 100644 pmd-appexchange/docs/AvoidApiSessionIdInXML.md create mode 100644 pmd-appexchange/docs/AvoidAuraAppWithLockerDisabled.md create mode 100644 pmd-appexchange/docs/AvoidAuraCmpWithLockerDisabled.md create mode 100644 pmd-appexchange/docs/AvoidChangeProtectionUnprotected.md create mode 100644 pmd-appexchange/docs/AvoidCreateElementScriptLinkTag.md create mode 100644 pmd-appexchange/docs/AvoidDisableProtocolSecurity.md create mode 100644 pmd-appexchange/docs/AvoidDisableProtocolSecurityInXML.md create mode 100644 pmd-appexchange/docs/AvoidGetInstanceWithTaint.md create mode 100644 pmd-appexchange/docs/AvoidGlobalInstallUninstallHandlers.md create mode 100644 pmd-appexchange/docs/AvoidHardCodedCredentialsInAura.md create mode 100644 pmd-appexchange/docs/AvoidHardCodedSecretsInVFAttrs.md create mode 100644 pmd-appexchange/docs/AvoidHardcodedCredentialsInFieldDecls.md create mode 100644 pmd-appexchange/docs/AvoidHardcodedCredentialsInHttpHeader.md create mode 100644 pmd-appexchange/docs/AvoidHardcodedCredentialsInSetPassword.md create mode 100644 pmd-appexchange/docs/AvoidHardcodedCredentialsInVarAssign.md create mode 100644 pmd-appexchange/docs/AvoidHardcodedCredentialsInVarDecls.md create mode 100644 pmd-appexchange/docs/AvoidInsecureHttpRemoteSiteSetting.md create mode 100644 pmd-appexchange/docs/AvoidInsecureHttpRemoteSiteSettingInXML.md create mode 100644 pmd-appexchange/docs/AvoidInvalidCrudContentDistribution.md create mode 100644 pmd-appexchange/docs/AvoidJavaScriptCustomObject.md create mode 100644 pmd-appexchange/docs/AvoidJavaScriptHomePageComponent.md create mode 100644 pmd-appexchange/docs/AvoidJavaScriptWeblink.md create mode 100644 pmd-appexchange/docs/AvoidJsLinksInCustomObject.md create mode 100644 pmd-appexchange/docs/AvoidJsLinksInWebLinks.md create mode 100644 pmd-appexchange/docs/AvoidLmcIsExposedTrue.md create mode 100644 pmd-appexchange/docs/AvoidLmcIsExposedTrueInXML.md create mode 100644 pmd-appexchange/docs/AvoidLwcBubblesComposedTrue.md create mode 100644 pmd-appexchange/docs/AvoidSControls.md create mode 100644 pmd-appexchange/docs/AvoidSecurityEnforcedOldApiVersion.md create mode 100644 pmd-appexchange/docs/AvoidSystemModeInFlows.md create mode 100644 pmd-appexchange/docs/AvoidUnauthorizedApiSessionIdInApex.md create mode 100644 pmd-appexchange/docs/AvoidUnauthorizedApiSessionIdInFlows.md create mode 100644 pmd-appexchange/docs/AvoidUnauthorizedApiSessionIdVisualforce.md create mode 100644 pmd-appexchange/docs/AvoidUnauthorizedGetSessionIdInApex.md create mode 100644 pmd-appexchange/docs/AvoidUnauthorizedGetSessionIdInVisualforce.md create mode 100644 pmd-appexchange/docs/AvoidUnescapedHtml.md create mode 100644 pmd-appexchange/docs/AvoidUnsafePasswordManagementUse.md create mode 100644 pmd-appexchange/docs/LimitConnectedAppScope.md create mode 100644 pmd-appexchange/docs/LoadCSSApexStylesheet.md create mode 100644 pmd-appexchange/docs/LoadCSSLinkHref.md create mode 100644 pmd-appexchange/docs/LoadJavaScriptHtmlScript.md create mode 100644 pmd-appexchange/docs/LoadJavaScriptIncludeScript.md create mode 100644 pmd-appexchange/docs/ProtectSensitiveData.md create mode 100644 pmd-appexchange/docs/UpgradeLwcLockerSecuritySupport.md create mode 100644 pmd-appexchange/docs/UseHttpsCallbackUrl.md create mode 100644 pmd-appexchange/docs/UseLwcDomManual.md diff --git a/pmd-appexchange/docs/AvoidApiSessionId.md b/pmd-appexchange/docs/AvoidApiSessionId.md new file mode 100644 index 000000000..97a2490a5 --- /dev/null +++ b/pmd-appexchange/docs/AvoidApiSessionId.md @@ -0,0 +1,18 @@ +AvoidApiSessionId[](#avoidapisessionid) +------------------------------------------------------------------------------------------------------------------------------------------------------ + +**Violation:** + + Session ID use may not be approved. + + +**Priority:** High (2) + +**Description:** + + Detects use of Api.Session_ID to retrieve a session ID. For more guidance on approved use cases, read the [Session Id Guidance][https://partners.salesforce.com/sfc/servlet.shepherd/version/download/0684V00000O83jT?asPdf=false&operationContext=CHATTER] document. + +**Example(s):** + + + diff --git a/pmd-appexchange/docs/AvoidApiSessionIdInXML.md b/pmd-appexchange/docs/AvoidApiSessionIdInXML.md new file mode 100644 index 000000000..a8b810832 --- /dev/null +++ b/pmd-appexchange/docs/AvoidApiSessionIdInXML.md @@ -0,0 +1,18 @@ +AvoidApiSessionIdInXML[](#avoidapisessionidinxml) +------------------------------------------------------------------------------------------------------------------------------------------------------ + +**Violation:** + + Session ID use is not approved. + + +**Priority:** High (2) + +**Description:** + + Detects use of Api.Session_ID to retrieve a session ID. For more guidance on approved use cases, read the [Session Id Guidance][https://partners.salesforce.com/sfc/servlet.shepherd/version/download/0684V00000O83jT?asPdf=false&operationContext=CHATTER] document. + +**Example(s):** + + + diff --git a/pmd-appexchange/docs/AvoidAuraAppWithLockerDisabled.md b/pmd-appexchange/docs/AvoidAuraAppWithLockerDisabled.md new file mode 100644 index 000000000..8c01d3458 --- /dev/null +++ b/pmd-appexchange/docs/AvoidAuraAppWithLockerDisabled.md @@ -0,0 +1,18 @@ +AvoidAuraAppWithLockerDisabled[](#avoidauraappwithlockerdisabled) +------------------------------------------------------------------------------------------------------------------------------------------------------ + +**Violation:** + + To enable Lightning Locker, update the apiVersion to version 40 or greater. + + +**Priority:** Critical (1) + +**Description:** + + Detects use of API versions with Lightning Locker disabled in Aura components. Use API version 40 or greater. + +**Example(s):** + + + diff --git a/pmd-appexchange/docs/AvoidAuraCmpWithLockerDisabled.md b/pmd-appexchange/docs/AvoidAuraCmpWithLockerDisabled.md new file mode 100644 index 000000000..998cc0ef1 --- /dev/null +++ b/pmd-appexchange/docs/AvoidAuraCmpWithLockerDisabled.md @@ -0,0 +1,18 @@ +AvoidAuraCmpWithLockerDisabled[](#avoidauracmpwithlockerdisabled) +------------------------------------------------------------------------------------------------------------------------------------------------------ + +**Violation:** + + To enable Lightning Locker, update the apiVersion to version 40 or greater. + + +**Priority:** Critical (1) + +**Description:** + + Detects use of API versions with Lightning Locker disabled in Aura components. Use API version 40 or greater. + +**Example(s):** + + + diff --git a/pmd-appexchange/docs/AvoidChangeProtectionUnprotected.md b/pmd-appexchange/docs/AvoidChangeProtectionUnprotected.md new file mode 100644 index 000000000..c66a30f3d --- /dev/null +++ b/pmd-appexchange/docs/AvoidChangeProtectionUnprotected.md @@ -0,0 +1,18 @@ +AvoidChangeProtectionUnprotected[](#avoidchangeprotectionunprotected) +------------------------------------------------------------------------------------------------------------------------------------------------------ + +**Violation:** + + Ensure appropriate authorization checks are in-place before invoking FeatureManagement.changeProtection called with 'UnProtected' argument. + + +**Priority:** Critical (1) + +**Description:** + + Detects potential misuse of FeatureManagement.changeProtection. + +**Example(s):** + + + diff --git a/pmd-appexchange/docs/AvoidCreateElementScriptLinkTag.md b/pmd-appexchange/docs/AvoidCreateElementScriptLinkTag.md new file mode 100644 index 000000000..0e07ad64a --- /dev/null +++ b/pmd-appexchange/docs/AvoidCreateElementScriptLinkTag.md @@ -0,0 +1,28 @@ +AvoidCreateElementScriptLinkTag[](#avoidcreateelementscriptlinktag) +------------------------------------------------------------------------------------------------------------------------------------------------------ + +**Violation:** + + Load JavaScript/CSS only from static resources. + + +**Priority:** High (2) + +**Description:** + +Detects dynamic creation of script or link tags +Note: This rule identifies the `