Branch: refs/heads/master
  Home:   https://github.com/pmd/pmd
  Commit: c6b7a723be52a77b6e4ebd6fa15f0511782b8bcc
      https://github.com/pmd/pmd/commit/c6b7a723be52a77b6e4ebd6fa15f0511782b8bcc
  Author: Jeff Bartolotta <jbartolo...@salesforce.com>
  Date:   2020-09-17 (Thu, 17 Sep 2020)

  Changed paths:
    M 
pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSharingViolationsRule.java
    A 
pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSharingViolationsNestedClassTest.java
    M 
pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/security/xml/ApexSharingViolations.xml

  Log Message:
  -----------
  Analyze inner classes for sharing violations

Fixes https://github.com/pmd/pmd/issues/2774, false positives and false
negatives for ApexSharingViolationsRule.

Sharing settings are not inherited by inner classes. Sharing settings
need to be declared on the class that contains the Database method, DML,
SOQL, or SOSL.

The change inverts the direction from which nodes are found and
analyzed. The previous code visited the ASTUserClass and then searched
for descendant nodes that met a certain criteria. It did not visit inner
ASTUserClass nodes because it didn't use rule chains or call the super's
visit moethod for ASTUserClassi.

The new implementation visits all nodes that correspond to Database
method, DML, SOQL, or SOSL nodes and then finds the nearest ASTUserClass
parent node. This ASTUserClass is examined to determine if it has
declared a sharing setting as required.


  Commit: 5429cebf380233f7569a41feb968ba7fcd30108c
      https://github.com/pmd/pmd/commit/5429cebf380233f7569a41feb968ba7fcd30108c
  Author: Jeff Bartolotta <jbartolo...@salesforce.com>
  Date:   2020-09-21 (Mon, 21 Sep 2020)

  Changed paths:
    M 
pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/security/xml/ApexSharingViolations.xml

  Log Message:
  -----------
  Add issue reproducers as standard rule tests

Added false negative and false positive test cases that were logged with
the original issue.


  Commit: eb0f7e4f991c23e5b0a9973bfd977e12c323384b
      https://github.com/pmd/pmd/commit/eb0f7e4f991c23e5b0a9973bfd977e12c323384b
  Author: Andreas Dangel <andreas.dan...@pmd-code.org>
  Date:   2020-09-24 (Thu, 24 Sep 2020)

  Changed paths:
    M docs/pages/release_notes.md

  Log Message:
  -----------
  [doc] Update release notes, refs #2791, fixes #2774


  Commit: 250501a3d1e5be7b0aec788560452ae8ece28e46
      https://github.com/pmd/pmd/commit/250501a3d1e5be7b0aec788560452ae8ece28e46
  Author: Andreas Dangel <andreas.dan...@pmd-code.org>
  Date:   2020-09-24 (Thu, 24 Sep 2020)

  Changed paths:
    M docs/pages/release_notes.md
    M 
pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSharingViolationsRule.java
    A 
pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSharingViolationsNestedClassTest.java
    M 
pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/security/xml/ApexSharingViolations.xml

  Log Message:
  -----------
  Merge branch 'pr-2791' into master

[apex] Analyze inner classes for sharing violations #2791


  Commit: f1e9a23b0123e1ad04da8f8cc98b95f549ac5872
      https://github.com/pmd/pmd/commit/f1e9a23b0123e1ad04da8f8cc98b95f549ac5872
  Author: Andreas Dangel <andreas.dan...@pmd-code.org>
  Date:   2020-09-24 (Thu, 24 Sep 2020)

  Changed paths:
    M docs/pages/release_notes.md

  Log Message:
  -----------
  [doc] Update release notes - group fixes by category


Compare: https://github.com/pmd/pmd/compare/54a5b03ccd67...f1e9a23b0123


_______________________________________________
Pmd-commits mailing list
Pmd-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmd-commits

Reply via email to