-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1519 from forcedotcom/release-4.3.0
RELEASE @W-16039195@: Conducting v4.3.0 release.
- Loading branch information
Showing
104 changed files
with
2,469 additions
and
1,678 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
pmd-appexchange/docs/AvoidCallingSystemResetPasswordWithEmailTemplate.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
AvoidCreateElementScriptLinkTag[](#avoidcreateelementscriptlinktag) | ||
------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
**Violation:** | ||
|
||
Load JavaScript/CSS only from static resources. | ||
|
||
|
||
**Priority:** High (2) | ||
|
||
**Description:** | ||
|
||
Detects dynamic creation of script or link tags | ||
|
||
**Example(s):** | ||
|
||
|
||
|
||
``` | ||
<script src="{!$Resource.jquery}"/> | ||
``` | ||
|
||
See more examples on properly using static resources here: https://developer.salesforce.com/docs/atlas.en-us.236.0.secure_coding_guide.meta/secure_coding_guide/secure_coding_cross_site_scripting.htm | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
AvoidGetInstanceWithTaint[](#avoidgetinstancewithtaint) | ||
------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
**Violation:** | ||
|
||
getInstance() is invoked with a potentially tainted parameter. | ||
|
||
|
||
**Priority:** Medium (3) | ||
|
||
**Description:** | ||
|
||
Detects use of getInstance(userId)/getInstance(profileId). Hierarchy Custom Settings return the record owned by the current user when `getInstance()` is invoked without any parameters. | ||
But if a tainted/end-user controlled `userId` or `profileId` is passed as a parameter to `getInstance()` that will allow the code to access records owned by other users on the org. | ||
Protected Custom Settings are the recommended approach to store subscriber owned secrets. Passing `userId` or `proileId` parameters to `getInstance()` could allow a user access to secrets that belong other other users on the org. | ||
|
||
**Example(s):** | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
pmd-appexchange/docs/AvoidHardcodedCredentialsInFieldDecls.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
AvoidHardcodedCredentialsInFieldDecls[](#avoidhardcodedcredentialsinfielddecls) | ||
------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
**Violation:** | ||
|
||
Hard-coded credentials found in source code. | ||
|
||
|
||
**Priority:** Medium (3) | ||
|
||
**Description:** | ||
|
||
Identifies hard-coded credentials in source code that must be protected using Protected Custom metadata or Protected Custom settings. | ||
Protected custom setttings or protected custom metadata should be used to store secrets. | ||
Refer to the [Protect Secrets Using Platform Features](https://trailhead.salesforce.com/content/learn/modules/secure-secrets-storage/protect-secrets-using-platform-features) Trailhead module for more guidance. | ||
|
||
|
||
**Example(s):** | ||
|
17 changes: 17 additions & 0 deletions
17
pmd-appexchange/docs/AvoidHardcodedCredentialsInHttpHeader.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
AvoidHardcodedCredentialsInHttpHeader[](#avoidhardcodedcredentialsinhttpheader) | ||
------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
**Violation:** | ||
|
||
Hard-coded credentials found in source code. | ||
|
||
|
||
**Priority:** Medium (3) | ||
|
||
**Description:** | ||
|
||
Identifies hard-coded credentials in source code that must be protected using Protected Custom metadata or Protected Custom settings. | ||
Protected custom setttings or protected custom metadata should be used to store secrets. | ||
Refer to the [Protect Secrets Using Platform Features](https://trailhead.salesforce.com/content/learn/modules/secure-secrets-storage/protect-secrets-using-platform-features) Trailhead module for more guidance. | ||
|
||
**Example(s):** |
23 changes: 23 additions & 0 deletions
23
pmd-appexchange/docs/AvoidHardcodedCredentialsInVarAssign.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
AvoidHardcodedCredentialsInVarAssign[](#avoidhardcodedcredentialsinvarassign) | ||
------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
**Violation:** | ||
|
||
Hard-coded credentials found in source code. | ||
|
||
|
||
**Priority:** Medium (3) | ||
|
||
**Description:** | ||
|
||
Identifies hard-coded credentials in source code that must be protected using Protected Custom metadata or Protected Custom settings. | ||
Protected custom setttings or protected custom metadata should be used to store secrets. | ||
Refer to the [Protect Secrets Using Platform Features](https://trailhead.salesforce.com/content/learn/modules/secure-secrets-storage/protect-secrets-using-platform-features) Trailhead module for more guidance. | ||
|
||
**Example(s):** | ||
``` | ||
19 changes: 19 additions & 0 deletions
19
pmd-appexchange/docs/AvoidHardcodedCredentialsInVarDecls.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
AvoidHardcodedCredentialsInVarDecls[](#avoidhardcodedcredentialsinvardecls) | ||
------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
**Violation:** | ||
|
||
Hard-coded credentials found in source code. | ||
|
||
|
||
**Priority:** Medium (3) | ||
|
||
**Description:** | ||
|
||
Identifies hard-coded credentials in source code that must be protected using Protected Custom metadata or Protected Custom settings. | ||
Protected custom setttings or protected custom metadata should be used to store secrets. | ||
Refer to the [Protect Secrets Using Platform Features](https://trailhead.salesforce.com/content/learn/modules/secure-secrets-storage/protect-secrets-using-platform-features) Trailhead module for more guidance. | ||
|
||
|
||
**Example(s):** | ||
|
33 changes: 33 additions & 0 deletions
33
pmd-appexchange/docs/AvoidInvalidCrudContentDistribution.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
AvoidInvalidCrudContentDistribution[](#avoidinvalidcrudcontentdistribution) | ||
------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
**Violation:** | ||
|
||
Do not use Schema.DescribeSObjectResult methods to enforce CRUD check on ContentDistribution | ||
|
||
|
||
**Priority:** Medium (3) | ||
|
||
**Description:** | ||
|
||
|
||
Detects the use of `Schema.DescribeSObjectResult` methods to enforce CRUD check on `ContentDistribution`. | ||
Developers should use `USER MODE` operations or use the custom below to enforce CRUD check against the `ContentDistribution` object. | ||
|
||
``` | ||
Boolean userCanCreatePublicLinks = 0 < | ||
[SELECT COUNT() FROM PermissionSetAssignment | ||
WHERE PermissionSet.PermissionsDistributeFromPersWksp = TRUE | ||
AND AssigneeId = :UserInfo.getUserId()]; | ||
if(userCanCreatePublicLinks){ | ||
//had CRUD permissions | ||
} | ||
else{ | ||
//handle error | ||
} | ||
``` | ||
|
||
**Example(s):** | ||
|
||
|
||
|
Oops, something went wrong.