Skip to content

Commit

Permalink
diagnose:audittrail & hardis:lint:access enhancements (#488)
Browse files Browse the repository at this point in the history
* Monitoring: Update default package-skip-items.xml

* Add PerSetUnassign in not suspect monitored actions in Setup Audit Trail

* Allow to add more non suspect items in audit trail

* lint:access

* Do not check mandatory fields

* cspell

* Call lint access by default

* [Mega-Linter] Apply linters fixes :)

---------

Co-authored-by: nvuillam <nvuillam@users.noreply.github.com>
  • Loading branch information
nvuillam and nvuillam authored Nov 19, 2023
1 parent a16b58c commit 3bd5b4a
Show file tree
Hide file tree
Showing 15 changed files with 612 additions and 285 deletions.
2 changes: 2 additions & 0 deletions .jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
"**/README.md",
"**/commands/hardis/work/**",
"**/apex.ts",
"**/access.ts",
"**/audittrail.ts",
"**/freeze.ts",
"**/legacyapi.ts",
"**/unfreeze.ts",
"**/redis.ts",
"**/*.json",
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta`

- Monitoring
- Update default **package-skip-items.xml**
- Call **hardis:lint:access** by default
- **hardis:org:diagnose:audittrail** enhancements:
- Add PerSetUnassign in not suspect monitored actions in Setup Audit Trail
- Allow to append more allowed Setup Audit Trail sections & actions using `.sfdx-hardis.yml` property **monitoringAllowedSectionsActions**
- **hardis:lint:access** enhancements:
- Exclude required fields and MasterDetails, that can not be defined on Permission Sets
- Output report file
- Send slack notification
- Add it by default in the monitoring commands
- Doc
- Update contributing infos (use `sf plugins link`)
- **hardis:files:export** : Make the command compliant with Email attachments

## [4.12.2] 2023-11-15
Expand Down
478 changes: 239 additions & 239 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config/sfdx-hardis.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"type": "string",
"enum": [
"caseentitlement",
"checkPermissions",
"dashboards",
"datadotcom",
"destructivechanges",
Expand Down
2 changes: 1 addition & 1 deletion defaults/ci/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ variables:
# - cd sfdx-hardis
# - yarn
# - tsc
# - sfdx plugins:link
# - sf plugins link
# - cd ..

# Code quality and security controls using MegaLinter Salesforce flavor
Expand Down
87 changes: 79 additions & 8 deletions defaults/monitoring/manifest/package-skip-items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,111 @@
<members>*</members>
<name>Certificate</name>
</types>

<types>
<members>*</members>
<members>*</members>
<name>ConnectedApp</name>
</types>

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>ContentAsset</name>
</types>
-->

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>CustomMetadata</name>
</types>
-->

<types>
<members>*</members>
<name>CustomObjectTranslation</name>
</types>

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>Dashboard</name>
</types>
-->

<types>
<members>*</members>
<name>Document</name>
</types>

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>EmailTemplate</name>
</types>
-->

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>GlobalValueSetTranslation</name>
</types>
-->

<types>
<members>*</members>
<name>ListView</name>
</types>

<types>
<members>*</members>
<name>ModerationRule</name>
<name>LightningMessageChannel</name>
</types>

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>Report</name>
</types>
-->

<types>
<members>*</members>
<name>ReportType</name>
</types>

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>SamlSsoConfig</name>
<name>StandardValueSetTranslation</name>
</types>
-->

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>SiteDotCom</name>
<name>StaticResource</name>
</types>
<!-- uncomment if you have too many metadatas and do not want to track static resources -->
<!--
-->

<types>
<members>*</members>
<name>StaticResource</name>
<name>UiViewDefinition</name>
</types>

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>Translation</name>
</types>
-->

<!-- Uncomment if you have too many metadatas
<types>
<members>*</members>
<name>WorkflowFieldUpdate</name>
</types>
-->

<version>59.0</version>
</Package>
</Package>
14 changes: 7 additions & 7 deletions docs/deployTips.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ description: Learn how to fix issues that can happen during sfdx deployments

This page summarizes all errors that can be detected by sfdx-hardis wrapper commands

| sfdx command | sfdx-hardis wrapper command |
| :----------- | :-------------------------- |
| [sfdx force:source:deploy](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_deploy) | [sfdx hardis:source:deploy](https://sfdx-hardis.cloudity.com/hardis/source/deploy/) |
| [sfdx force:source:push](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_push) | [sfdx hardis:source:push](https://sfdx-hardis.cloudity.com/hardis/source/push/) |
| [sfdx force:mdapi:deploy](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_mdapi.htm#cli_reference_force_mdapi_beta_deploy) | [sfdx hardis:mdapi:deploy](https://sfdx-hardis.cloudity.com/hardis/mdapi/deploy/) |
| sfdx command | sfdx-hardis wrapper command |
|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| [sfdx force:source:deploy](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_deploy) | [sfdx hardis:source:deploy](https://sfdx-hardis.cloudity.com/hardis/source/deploy/) |
| [sfdx force:source:push](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_push) | [sfdx hardis:source:push](https://sfdx-hardis.cloudity.com/hardis/source/push/) |
| [sfdx force:mdapi:deploy](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_mdapi.htm#cli_reference_force_mdapi_beta_deploy) | [sfdx hardis:mdapi:deploy](https://sfdx-hardis.cloudity.com/hardis/mdapi/deploy/) |

You can also use this function on a [sfdx-hardis Salesforce CI/CD project](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-home/)

Expand Down Expand Up @@ -302,7 +302,7 @@ You probably also need to add CRM Analytics Admin Permission Set assignment to t
## Error parsing file
- `Error (.*) Error parsing file: (.*) `
- `Error (.*) Error parsing file: (.*)`
**Resolution tip**
Expand Down Expand Up @@ -912,7 +912,7 @@ Please check https://developer.salesforce.com/forums/?id=9060G0000005kVLQAY
## Test classes with 0% coverage
- ` 0%`
- `0%`
**Resolution tip**
Expand Down
1 change: 1 addition & 0 deletions docs/hardis/work/save.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Example:

```yaml
autoCleanTypes:
- checkPermissions
- destructivechanges
- datadotcom
- minimizeProfiles
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Anyone is welcome to contribute to this sfdx-hardis
- Fork this repo and clone it (or just clone if you are an internal contributor)
- At the root of the repository:
- Run `yarn` to install dependencies
- Run `sfdx plugins:link` to link the local sfdx-hardis to SFDX CLI
- Run `sf plugins link` to link the local sfdx-hardis to SFDX CLI
- Run `tsc --watch` to transpile typescript into js everytime you update a TS file
- Debug commands using `NODE_OPTIONS=--inspect-brk sfdx hardis:somecommand -someparameter somevalue`

Expand Down
Loading

0 comments on commit 3bd5b4a

Please sign in to comment.