Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address Rego Linter (Regal) Rules #640

Merged
merged 14 commits into from
Nov 28, 2023

Conversation

Sloane4
Copy link
Collaborator

@Sloane4 Sloane4 commented Nov 3, 2023

🗣 Description

Update rules to be warning instead of ignore

  1. line length
  2. identically named tests
  3. constant condition* (see the original comment chain for more context)
  4. test-outside-test-package
  5. prefer-some-in-iteration
  6. rule-length

💭 Motivation and context

This issue is to address follow ups from #594 along with any other Linter rules we wish to follow.
Closing #615

🧪 Testing

The linter WILL display warnings, they will be fixed in the related refactor issues, see #638

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

@Sloane4 Sloane4 added the enhancement This issue or pull request will add new or improve existing functionality label Nov 3, 2023
@Sloane4 Sloane4 added this to the Flipper milestone Nov 3, 2023
@Sloane4 Sloane4 self-assigned this Nov 3, 2023
@Sloane4 Sloane4 linked an issue Nov 3, 2023 that may be closed by this pull request
@Sloane4 Sloane4 marked this pull request as ready for review November 3, 2023 18:39
@Sloane4 Sloane4 requested a review from crutchfield November 6, 2023 13:19
Copy link
Collaborator

@schrolla schrolla left a comment

Choose a reason for hiding this comment

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

Overall looks great, just a few minor and mostly cosmetic items I would recommend be updated. See individual comments for recommendations.

@Sloane4 Sloane4 changed the base branch from main to flipper November 27, 2023 15:04
@Sloane4 Sloane4 force-pushed the 615-address-rego-linter-regal-rules branch from fbc0bf3 to 808619b Compare November 27, 2023 15:05
@Sloane4 Sloane4 requested a review from schrolla November 27, 2023 15:37
Copy link
Collaborator

@schrolla schrolla left a comment

Choose a reason for hiding this comment

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

A few wording suggestions to the update. Let me know what you think.

@Sloane4 Sloane4 requested a review from schrolla November 27, 2023 16:03
@Sloane4 Sloane4 force-pushed the 615-address-rego-linter-regal-rules branch from 2eaa738 to 491daf7 Compare November 27, 2023 16:11
Sloane4 and others added 13 commits November 27, 2023 11:20
Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
@Sloane4 Sloane4 force-pushed the 615-address-rego-linter-regal-rules branch from f88cb3f to b4ce2d0 Compare November 27, 2023 16:21
Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
@Sloane4
Copy link
Collaborator Author

Sloane4 commented Nov 27, 2023

@nanda-katikaneni ready for merge

@nanda-katikaneni nanda-katikaneni merged commit 7a11343 into flipper Nov 28, 2023
@nanda-katikaneni nanda-katikaneni deleted the 615-address-rego-linter-regal-rules branch November 28, 2023 16:14
james-garriss pushed a commit that referenced this pull request Dec 14, 2023
* Change ignore to warning for specified rules in issue

* update style guide for new linter rules

* change to warning for test-outside-test-package and rule-length

* Update .regal/config.yaml

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update .regal/config.yaml

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* updated opa rego intro paragraph

* removed extra sentance

* removed bulletpoint

* fix capitalization

* add punctuation

* word smithing

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

---------

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
james-garriss pushed a commit that referenced this pull request Dec 14, 2023
* Change ignore to warning for specified rules in issue

* update style guide for new linter rules

* change to warning for test-outside-test-package and rule-length

* Update .regal/config.yaml

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update .regal/config.yaml

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* updated opa rego intro paragraph

* removed extra sentance

* removed bulletpoint

* fix capitalization

* add punctuation

* word smithing

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

---------

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
james-garriss added a commit that referenced this pull request Dec 14, 2023
commit ff766d5
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 18:03:26 2023 -0500

    Refactor Exo Rego Code (#662)

    * first round of cleanup

    first round of cleanup

    * create helper funtion for conditions filter code

    create helper funtion for conditions filter code

    * add comments pt 1

    add comments pt 1

    add comments pt 2

    add comments pt 2

    * update syntax for constant

    update syntax for constant

    * update for test package

    update for test package

    * fix policy indicated comments

    fix policy indicated comments

    * fix json formatting & rego formatting

    fix json formatting & rego formatting

    * refactor out duplicate code in tests

    refactor out duplicate code in tests

    * remove unused imports

    remove unused imports

    * remove unused var

    remove unused var

    * remove constant

commit d5cb929
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 15:50:14 2023 -0500

    Refactor Defender Rego Code (#663)

    * first round of cleanup

    * update for test package

    * fix policy spaces

    * fix json formatting & unfixed unit tests

    * refactor out duplicate code in test cases

    * refactor out OR checking duplicate code

    * add comments

    * add constants

    * add set comprehension to method call

commit 29536fe
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 15:49:31 2023 -0500

    Refactor AAD Rego Code (#664)

    * first round of cleanup

    * update for test package

    * update for constants

    * fix json formatting

    * remove extra newline

    * refactor out duplicate code in tests

    * add comments part 1

    add comments part 2

    * fix test cases

    * fix based on some comments

commit f7cd368
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Wed Dec 13 15:14:28 2023 -0500

    Smoke test periodically fails (#728)

    * Rework download logic

    * Fix file path

    * Fix clean up

    * Update Testing/Functional/SmokeTest/UpdateSelenium.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Add error action to download

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit 883815c
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 09:10:32 2023 -0500

    Refactor Teams Rego Code (#660)

    * first round of cleanup

    * address line length & rule length warnings. Also refactor duplicate code & constants

    * default over else line 413

    * cleanup

    * add spacing

    * add comments

    * fix line length

    * update for test package

    * fix spacing

    * fix policy indicated comments

    * refactor out duplicate code in test cases

    * fix json formatting

    * remove unused var

    * Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * update var name

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit e623c92
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 09:10:00 2023 -0500

    Refactor Power Platform (#661)

    * first round of cleanup

    * create helper funtion for conditions filter code

    * add comments

    * update for test package

    * fix policy indicated comments

    * fix json formatting & rego formatting

    * refactor out duplicate code in test cases

    * Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit d88a16e
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Tue Dec 12 20:22:17 2023 -0500

    Refactor Sharepoint Rego Code (#659)

    * add constants & reduce line lengths

    * removed unnecessary commas

    * create helper funtion for conditions filter code

    * add newline between constants

    * address line length & rule length warnings

    * add comments

    * add comments

    * removed top level iteration

    * cleanup

    * update for test package

    * remove extra newline

    * fix boolean compare in unit tests

    * create constants for sharing settings

    * add naming convention for test package

    * remove extra space at end of file

    * fix json format

    * fix package naming pattern

    * fix policy indicated comments

    * refactor out duplicate code in test cases

    * remove unused var

commit a5a679a
Author: Dylan Gao <107067015+Dylan-MITRE@users.noreply.github.com>
Date:   Mon Dec 11 14:38:00 2023 -0500

    add progress bar for OPA download (#682)

    * Update OPA.ps1

    * Update OPA.ps1

    * remove white space and requirement

    * Update OPA.ps1

    revert to bit transfer and detailed error messages

commit 8698efb
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Mon Dec 11 14:36:48 2023 -0500

    Breaking dependency on opa in unit testing (#721)

    * Mock opa executable

    * Mock API Module

    * Add NoOpa to setup call

    * Backout unrelated change

commit fe743e1
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Mon Dec 11 13:34:37 2023 -0500

    Remove PnP work-around (#725)

commit 2b2b729
Author: mitchelbaker-cisa <149098823+mitchelbaker-cisa@users.noreply.github.com>
Date:   Mon Dec 11 09:09:34 2023 -0800

    update unused variables to wildcards in DefenderConfig.rego, EXOConfig.rego, PowerPlatformConfig.rego, TeamsConfig.rego, ReportUtils.rego (up to v0.51.0) (#631)

commit 2b4bb8e
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Thu Dec 7 16:33:40 2023 -0500

    Download OPA only when required & Print real error message (#641)

    * Download only when needed & print real error

    * removed unneeded comment

    * added ability to take parameter input & removed hardcoded hash

    * cleanup

    * get hash from .sha256 file

    * update to check from acceptable version

    * add function to install opa for other os

    * update help message

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update SetUp.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * edge case fix

    * prevent user from accidently overwiting personal file

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit bbb6c86
Author: James Garriss <52328727+james-garriss@users.noreply.github.com>
Date:   Wed Dec 6 10:21:52 2023 -0500

    updated checkout action version (#692)

    * updated checkout action version

    * update checkout to v4

    ---------

    Co-authored-by: James Garriss <jgarriss@mitre.org>

commit 5016111
Author: David Bui <105074908+buidav@users.noreply.github.com>
Date:   Tue Dec 5 09:28:30 2023 -0800

    add -UseBasicParsing to Invoke-WebRequest (#695)

commit 7a11343
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Tue Nov 28 11:14:14 2023 -0500

    Address Rego Linter (Regal) Rules (#640)

    * Change ignore to warning for specified rules in issue

    * update style guide for new linter rules

    * change to warning for test-outside-test-package and rule-length

    * Update .regal/config.yaml

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update .regal/config.yaml

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * updated opa rego intro paragraph

    * removed extra sentance

    * removed bulletpoint

    * fix capitalization

    * add punctuation

    * word smithing

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit 8e46600
Author: Andrew Huynh <113476170+ahuynhMITRE@users.noreply.github.com>
Date:   Mon Nov 27 10:38:45 2023 -0500

    added critcality (#690)
mitchelbaker-cisa pushed a commit that referenced this pull request Dec 15, 2023
* Change ignore to warning for specified rules in issue

* update style guide for new linter rules

* change to warning for test-outside-test-package and rule-length

* Update .regal/config.yaml

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update .regal/config.yaml

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* updated opa rego intro paragraph

* removed extra sentance

* removed bulletpoint

* fix capitalization

* add punctuation

* word smithing

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

---------

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
james-garriss added a commit that referenced this pull request Dec 28, 2023
commit ff766d5
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 18:03:26 2023 -0500

    Refactor Exo Rego Code (#662)

    * first round of cleanup

    first round of cleanup

    * create helper funtion for conditions filter code

    create helper funtion for conditions filter code

    * add comments pt 1

    add comments pt 1

    add comments pt 2

    add comments pt 2

    * update syntax for constant

    update syntax for constant

    * update for test package

    update for test package

    * fix policy indicated comments

    fix policy indicated comments

    * fix json formatting & rego formatting

    fix json formatting & rego formatting

    * refactor out duplicate code in tests

    refactor out duplicate code in tests

    * remove unused imports

    remove unused imports

    * remove unused var

    remove unused var

    * remove constant

commit d5cb929
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 15:50:14 2023 -0500

    Refactor Defender Rego Code (#663)

    * first round of cleanup

    * update for test package

    * fix policy spaces

    * fix json formatting & unfixed unit tests

    * refactor out duplicate code in test cases

    * refactor out OR checking duplicate code

    * add comments

    * add constants

    * add set comprehension to method call

commit 29536fe
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 15:49:31 2023 -0500

    Refactor AAD Rego Code (#664)

    * first round of cleanup

    * update for test package

    * update for constants

    * fix json formatting

    * remove extra newline

    * refactor out duplicate code in tests

    * add comments part 1

    add comments part 2

    * fix test cases

    * fix based on some comments

commit f7cd368
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Wed Dec 13 15:14:28 2023 -0500

    Smoke test periodically fails (#728)

    * Rework download logic

    * Fix file path

    * Fix clean up

    * Update Testing/Functional/SmokeTest/UpdateSelenium.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Add error action to download

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit 883815c
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 09:10:32 2023 -0500

    Refactor Teams Rego Code (#660)

    * first round of cleanup

    * address line length & rule length warnings. Also refactor duplicate code & constants

    * default over else line 413

    * cleanup

    * add spacing

    * add comments

    * fix line length

    * update for test package

    * fix spacing

    * fix policy indicated comments

    * refactor out duplicate code in test cases

    * fix json formatting

    * remove unused var

    * Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * update var name

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit e623c92
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 09:10:00 2023 -0500

    Refactor Power Platform (#661)

    * first round of cleanup

    * create helper funtion for conditions filter code

    * add comments

    * update for test package

    * fix policy indicated comments

    * fix json formatting & rego formatting

    * refactor out duplicate code in test cases

    * Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit d88a16e
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Tue Dec 12 20:22:17 2023 -0500

    Refactor Sharepoint Rego Code (#659)

    * add constants & reduce line lengths

    * removed unnecessary commas

    * create helper funtion for conditions filter code

    * add newline between constants

    * address line length & rule length warnings

    * add comments

    * add comments

    * removed top level iteration

    * cleanup

    * update for test package

    * remove extra newline

    * fix boolean compare in unit tests

    * create constants for sharing settings

    * add naming convention for test package

    * remove extra space at end of file

    * fix json format

    * fix package naming pattern

    * fix policy indicated comments

    * refactor out duplicate code in test cases

    * remove unused var

commit a5a679a
Author: Dylan Gao <107067015+Dylan-MITRE@users.noreply.github.com>
Date:   Mon Dec 11 14:38:00 2023 -0500

    add progress bar for OPA download (#682)

    * Update OPA.ps1

    * Update OPA.ps1

    * remove white space and requirement

    * Update OPA.ps1

    revert to bit transfer and detailed error messages

commit 8698efb
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Mon Dec 11 14:36:48 2023 -0500

    Breaking dependency on opa in unit testing (#721)

    * Mock opa executable

    * Mock API Module

    * Add NoOpa to setup call

    * Backout unrelated change

commit fe743e1
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Mon Dec 11 13:34:37 2023 -0500

    Remove PnP work-around (#725)

commit 2b2b729
Author: mitchelbaker-cisa <149098823+mitchelbaker-cisa@users.noreply.github.com>
Date:   Mon Dec 11 09:09:34 2023 -0800

    update unused variables to wildcards in DefenderConfig.rego, EXOConfig.rego, PowerPlatformConfig.rego, TeamsConfig.rego, ReportUtils.rego (up to v0.51.0) (#631)

commit 2b4bb8e
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Thu Dec 7 16:33:40 2023 -0500

    Download OPA only when required & Print real error message (#641)

    * Download only when needed & print real error

    * removed unneeded comment

    * added ability to take parameter input & removed hardcoded hash

    * cleanup

    * get hash from .sha256 file

    * update to check from acceptable version

    * add function to install opa for other os

    * update help message

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update SetUp.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * edge case fix

    * prevent user from accidently overwiting personal file

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit bbb6c86
Author: James Garriss <52328727+james-garriss@users.noreply.github.com>
Date:   Wed Dec 6 10:21:52 2023 -0500

    updated checkout action version (#692)

    * updated checkout action version

    * update checkout to v4

    ---------

    Co-authored-by: James Garriss <jgarriss@mitre.org>

commit 5016111
Author: David Bui <105074908+buidav@users.noreply.github.com>
Date:   Tue Dec 5 09:28:30 2023 -0800

    add -UseBasicParsing to Invoke-WebRequest (#695)

commit 7a11343
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Tue Nov 28 11:14:14 2023 -0500

    Address Rego Linter (Regal) Rules (#640)

    * Change ignore to warning for specified rules in issue

    * update style guide for new linter rules

    * change to warning for test-outside-test-package and rule-length

    * Update .regal/config.yaml

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update .regal/config.yaml

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * updated opa rego intro paragraph

    * removed extra sentance

    * removed bulletpoint

    * fix capitalization

    * add punctuation

    * word smithing

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit 8e46600
Author: Andrew Huynh <113476170+ahuynhMITRE@users.noreply.github.com>
Date:   Mon Nov 27 10:38:45 2023 -0500

    added critcality (#690)
james-garriss added a commit that referenced this pull request Dec 29, 2023
commit ff766d5
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 18:03:26 2023 -0500

    Refactor Exo Rego Code (#662)

    * first round of cleanup

    first round of cleanup

    * create helper funtion for conditions filter code

    create helper funtion for conditions filter code

    * add comments pt 1

    add comments pt 1

    add comments pt 2

    add comments pt 2

    * update syntax for constant

    update syntax for constant

    * update for test package

    update for test package

    * fix policy indicated comments

    fix policy indicated comments

    * fix json formatting & rego formatting

    fix json formatting & rego formatting

    * refactor out duplicate code in tests

    refactor out duplicate code in tests

    * remove unused imports

    remove unused imports

    * remove unused var

    remove unused var

    * remove constant

commit d5cb929
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 15:50:14 2023 -0500

    Refactor Defender Rego Code (#663)

    * first round of cleanup

    * update for test package

    * fix policy spaces

    * fix json formatting & unfixed unit tests

    * refactor out duplicate code in test cases

    * refactor out OR checking duplicate code

    * add comments

    * add constants

    * add set comprehension to method call

commit 29536fe
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 15:49:31 2023 -0500

    Refactor AAD Rego Code (#664)

    * first round of cleanup

    * update for test package

    * update for constants

    * fix json formatting

    * remove extra newline

    * refactor out duplicate code in tests

    * add comments part 1

    add comments part 2

    * fix test cases

    * fix based on some comments

commit f7cd368
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Wed Dec 13 15:14:28 2023 -0500

    Smoke test periodically fails (#728)

    * Rework download logic

    * Fix file path

    * Fix clean up

    * Update Testing/Functional/SmokeTest/UpdateSelenium.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Add error action to download

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit 883815c
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 09:10:32 2023 -0500

    Refactor Teams Rego Code (#660)

    * first round of cleanup

    * address line length & rule length warnings. Also refactor duplicate code & constants

    * default over else line 413

    * cleanup

    * add spacing

    * add comments

    * fix line length

    * update for test package

    * fix spacing

    * fix policy indicated comments

    * refactor out duplicate code in test cases

    * fix json formatting

    * remove unused var

    * Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/TeamsConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * update var name

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit e623c92
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Wed Dec 13 09:10:00 2023 -0500

    Refactor Power Platform (#661)

    * first round of cleanup

    * create helper funtion for conditions filter code

    * add comments

    * update for test package

    * fix policy indicated comments

    * fix json formatting & rego formatting

    * refactor out duplicate code in test cases

    * Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    Update Rego/PowerPlatformConfig.rego

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit d88a16e
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Tue Dec 12 20:22:17 2023 -0500

    Refactor Sharepoint Rego Code (#659)

    * add constants & reduce line lengths

    * removed unnecessary commas

    * create helper funtion for conditions filter code

    * add newline between constants

    * address line length & rule length warnings

    * add comments

    * add comments

    * removed top level iteration

    * cleanup

    * update for test package

    * remove extra newline

    * fix boolean compare in unit tests

    * create constants for sharing settings

    * add naming convention for test package

    * remove extra space at end of file

    * fix json format

    * fix package naming pattern

    * fix policy indicated comments

    * refactor out duplicate code in test cases

    * remove unused var

commit a5a679a
Author: Dylan Gao <107067015+Dylan-MITRE@users.noreply.github.com>
Date:   Mon Dec 11 14:38:00 2023 -0500

    add progress bar for OPA download (#682)

    * Update OPA.ps1

    * Update OPA.ps1

    * remove white space and requirement

    * Update OPA.ps1

    revert to bit transfer and detailed error messages

commit 8698efb
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Mon Dec 11 14:36:48 2023 -0500

    Breaking dependency on opa in unit testing (#721)

    * Mock opa executable

    * Mock API Module

    * Add NoOpa to setup call

    * Backout unrelated change

commit fe743e1
Author: Richard Crutchfield <crutchfield@users.noreply.github.com>
Date:   Mon Dec 11 13:34:37 2023 -0500

    Remove PnP work-around (#725)

commit 2b2b729
Author: mitchelbaker-cisa <149098823+mitchelbaker-cisa@users.noreply.github.com>
Date:   Mon Dec 11 09:09:34 2023 -0800

    update unused variables to wildcards in DefenderConfig.rego, EXOConfig.rego, PowerPlatformConfig.rego, TeamsConfig.rego, ReportUtils.rego (up to v0.51.0) (#631)

commit 2b4bb8e
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Thu Dec 7 16:33:40 2023 -0500

    Download OPA only when required & Print real error message (#641)

    * Download only when needed & print real error

    * removed unneeded comment

    * added ability to take parameter input & removed hardcoded hash

    * cleanup

    * get hash from .sha256 file

    * update to check from acceptable version

    * add function to install opa for other os

    * update help message

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update SetUp.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update OPA.ps1

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * edge case fix

    * prevent user from accidently overwiting personal file

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit bbb6c86
Author: James Garriss <52328727+james-garriss@users.noreply.github.com>
Date:   Wed Dec 6 10:21:52 2023 -0500

    updated checkout action version (#692)

    * updated checkout action version

    * update checkout to v4

    ---------

    Co-authored-by: James Garriss <jgarriss@mitre.org>

commit 5016111
Author: David Bui <105074908+buidav@users.noreply.github.com>
Date:   Tue Dec 5 09:28:30 2023 -0800

    add -UseBasicParsing to Invoke-WebRequest (#695)

commit 7a11343
Author: Cassandra Diaz <47129205+Sloane4@users.noreply.github.com>
Date:   Tue Nov 28 11:14:14 2023 -0500

    Address Rego Linter (Regal) Rules (#640)

    * Change ignore to warning for specified rules in issue

    * update style guide for new linter rules

    * change to warning for test-outside-test-package and rule-length

    * Update .regal/config.yaml

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update .regal/config.yaml

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    * updated opa rego intro paragraph

    * removed extra sentance

    * removed bulletpoint

    * fix capitalization

    * add punctuation

    * word smithing

    * Update CONTENTSTYLEGUIDE.md

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

    ---------

    Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

commit 8e46600
Author: Andrew Huynh <113476170+ahuynhMITRE@users.noreply.github.com>
Date:   Mon Nov 27 10:38:45 2023 -0500

    added critcality (#690)
schrolla added a commit that referenced this pull request Jan 19, 2024
* Change ignore to warning for specified rules in issue

* update style guide for new linter rules

* change to warning for test-outside-test-package and rule-length

* Update .regal/config.yaml

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update .regal/config.yaml

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

* updated opa rego intro paragraph

* removed extra sentance

* removed bulletpoint

* fix capitalization

* add punctuation

* word smithing

* Update CONTENTSTYLEGUIDE.md

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>

---------

Co-authored-by: Addam Schroll <108814318+schrolla@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue or pull request will add new or improve existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Address Rego Linter (Regal) Rules
4 participants