GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [apex] fixed WITH SECURITY_ENFORCED regex to recognise line break characters by kieranlblack · Pull Request #2397 · pmd/pmd

Conversation

@kieranlblack

@kieranlblack kieranlblack commented Apr 3, 2020 •
edited by adangel
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Description:

Rule: ApexCrudViolation

Modified the regex used when checking if WITH SECURITY_ENFORCED is used to ensure it will account for any extra line break characters due to stylistic choices. Before, newlines would cause a false negative.

This continues to fix #2210

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Kieran Black
fixed WITH SECURITY_ENFORCED regex to recognise line break characters
d09d4de
@ghost

ghost commented Apr 3, 2020

Copy link
Copy Markdown
1 Message
📖 No java rules are changed!

Generated by 🚫 Danger

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adangel

adangel commented Apr 3, 2020

Copy link
Copy Markdown
Member

@kieranlblack Thanks for the PR!

Would you mind adding a test case here: https://github.com/pmd/pmd/blob/master/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/security/xml/ApexCRUDViolation.xml ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Kieran Black
added tests for line breaks
746797e
@adangel adangel added this to the 6.23.0 milestone Apr 4, 2020
adangel
adangel approved these changes Apr 4, 2020
View reviewed changes

@adangel adangel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adangel adangel self-assigned this Apr 4, 2020
@adangel adangel linked an issue Apr 4, 2020 that may be closed by this pull request
[apex] ApexCRUDViolation: false positive with security enforced with line break #2399
Closed
@adangel
adangel merged commit 746797e into pmd:master Apr 4, 2020
adangel added a commit that referenced this pull request Apr 4, 2020
@adangel
[doc] Update release notes, refs #2397, fixes #2399
e47a6b0
adangel added a commit that referenced this pull request Apr 4, 2020
@adangel
Merge branch 'pr-2397'
9155a31
[apex] fixed WITH SECURITY_ENFORCED regex to recognise line break characters #2397
@kieranlblack
kieranlblack deleted the fixCRUDRule branch April 4, 2020 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adangel adangel adangel approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adangel adangel

Labels

None yet

Projects

None yet

Milestone

6.23.0

Development

Successfully merging this pull request may close these issues.

[apex] ApexCRUDViolation: false positive with security enforced with line break [apex] ApexCRUDViolation: Support WITH SECURITY_ENFORCED

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@kieranlblack @adangel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.