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

Updated regal to latest version #964

Merged
merged 8 commits into from
Mar 12, 2024

Conversation

crutchfield
Copy link
Contributor

🗣 Description

Updated regal to use latest version - update uses Node 20+
closes #917

💭 Motivation and context

Node 16 is no longer supported with security updates

🧪 Testing

  • Executed Rego unit test / linter

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • PR targets the correct parent branch (e.g., main or release-name) for merge.
  • Changes are limited to a single goal - eschew scope creep!
  • Changes are sized such that they do not touch excessive number of files.
  • All future TODOs are captured in issues, which are referenced in code comments.
  • These code changes follow the ScubaGear content style guide.
  • Related issues these changes resolve are linked preferably via closing keywords.
  • All relevant type-of-change labels added.
  • All relevant project fields are set.
  • All relevant repo and/or project documentation updated to reflect these changes.
  • Unit tests added/updated to cover PowerShell and Rego changes.
  • Functional tests added/updated to cover PowerShell and Rego changes.
  • All relevant functional tests passed.
  • All automated checks (e.g., linting, static analysis, unit/smoke tests) passed.

✅ Pre-merge checklist

  • PR passed smoke test check.

  • Feature branch has been rebased against changes from parent branch, as needed

    Use Rebase branch button below or use this reference to rebase from the command line.

  • Resolved all merge conflicts on branch

  • Notified merge coordinator that PR is ready for merge via comment mention

✅ Post-merge checklist

  • Feature branch deleted after merge to clean up repository.
  • Verified that all checks pass on parent branch (e.g., main or release-name) after merge.

@crutchfield crutchfield added the enhancement This issue or pull request will add new or improve existing functionality label Mar 5, 2024
@crutchfield crutchfield added this to the Glacier milestone Mar 5, 2024
@crutchfield crutchfield self-assigned this Mar 5, 2024
@crutchfield crutchfield linked an issue Mar 5, 2024 that may be closed by this pull request
1 task
Copy link
Collaborator

@james-garriss james-garriss left a comment

Choose a reason for hiding this comment

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

Looks like minor changes for a language version update.

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.

Reviewed changed and ran Invoke-Scuba which worked as intended with latest release. However, noted that changing import rego.v1 and removing if {} statements has the effect of making versions of Rego <0.59 fail as the syntax is not supported by earlier versions of the engine. I am okay with requiring newer versions, but it means we should also update the list of allowed OPA rego engine versions in the Install-OPA method to only support 0.59 and up (0.60 and 0.61 at the moment).

Recommend updating allowed list by removing those now unsupported versions. Also recommend rebase first as the allow list has been updated by a now merged commit.

PowerShell/ScubaGear/Rego/DefenderConfig.rego Outdated Show resolved Hide resolved
@crutchfield crutchfield force-pushed the 917-update-regal-to-latest-version branch from 5f37020 to 6748ef9 Compare March 6, 2024 16:35
@crutchfield
Copy link
Contributor Author

Reviewed changed and ran Invoke-Scuba which worked as intended with latest release. However, noted that changing import rego.v1 and removing if {} statements has the effect of making versions of Rego <0.59 fail as the syntax is not supported by earlier versions of the engine. I am okay with requiring newer versions, but it means we should also update the list of allowed OPA rego engine versions in the Install-OPA method to only support 0.59 and up (0.60 and 0.61 at the moment).

Recommend updating allowed list by removing those now unsupported versions. Also recommend rebase first as the allow list has been updated by a now merged commit.

Change to allow tested version 59-61.

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.

Everything still works as expected, except for the comment below.

PowerShell/ScubaGear/Modules/Support/Support.psm1 Outdated Show resolved Hide resolved
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.

Reviewed latest updates and found that it installed the latest version of OPA running both Initialize-SCuBA and Install-OPA as expected. No other issues found and looks ready for merge.

@crutchfield
Copy link
Contributor Author

@nanda-katikaneni PR is ready to merge to main

@nanda-katikaneni nanda-katikaneni merged commit 68ebd0c into main Mar 12, 2024
14 of 16 checks passed
@nanda-katikaneni nanda-katikaneni deleted the 917-update-regal-to-latest-version branch March 12, 2024 16:44
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.

Update Regal to latest version
4 participants