Skip to content

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Jul 31, 2025

Effectively allows us to get away from using numbers in actions in MQL policies:

        checks:
          - uid: check-05
            action: preview

This introduces the "preview" keyword as a new enum action. It will replace the (now really) deprecated "skip" action, which is a relict of the past starting in v12.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Copy link
Contributor

Test Results

4 365 tests  ±0   4 361 ✅ ±0   2m 18s ⏱️ -14s
  408 suites ±0       4 💤 ±0 
   30 files   ±0       0 ❌ ±0 

Results for commit 22a1075. ± Comparison against base commit 4a1b20a.

arlimus added a commit to mondoohq/cnspec that referenced this pull request Jul 31, 2025
Introduces the `valid` keyword in policies, which supports setting an
`until` value. This allows us to create human-readable policy groups
that are configured for a limited time.

This is particularly useful when defining temporary exceptions:

```
policies:
  - uid: example1
    name: Example policy 1
    groups:
      - filters:
          - mql: asset.family.contains('unix')
        checks:
          - uid: check-05
            title: SSHd should only use very secure ciphers
            mql: |
              sshd.config.ciphers.all( _ == /ctr/ )
            impact: 95

      - type: override
        title: Exception for strong ciphers until September
        valid:
          until: 2025-09-01
        checks:
          - uid: check-05
            action: preview
```

Depends on mondoohq/cnquery#5817
arlimus added a commit to mondoohq/cnspec that referenced this pull request Jul 31, 2025
Introduces the `valid` keyword in policies, which supports setting an
`until` value. This allows us to create human-readable policy groups
that are configured for a limited time.

This is particularly useful when defining temporary exceptions:

```
policies:
  - uid: example1
    name: Example policy 1
    groups:
      - filters:
          - mql: asset.family.contains('unix')
        checks:
          - uid: check-05
            title: SSHd should only use very secure ciphers
            mql: |
              sshd.config.ciphers.all( _ == /ctr/ )
            impact: 95

      - type: override
        title: Exception for strong ciphers until September
        valid:
          until: 2025-09-01
        checks:
          - uid: check-05
            action: preview
```

Depends on mondoohq/cnquery#5817
arlimus added a commit to mondoohq/cnspec that referenced this pull request Jul 31, 2025
Introduces the `valid` keyword in policies, which supports setting an
`until` value. This allows us to create human-readable policy groups
that are configured for a limited time.

This is particularly useful when defining temporary exceptions:

```
policies:
  - uid: example1
    name: Example policy 1
    groups:
      - filters:
          - mql: asset.family.contains('unix')
        checks:
          - uid: check-05
            title: SSHd should only use very secure ciphers
            mql: |
              sshd.config.ciphers.all( _ == /ctr/ )
            impact: 95

      - type: override
        title: Exception for strong ciphers until September
        valid:
          until: 2025-09-01
        checks:
          - uid: check-05
            action: preview
```

Depends on mondoohq/cnquery#5817
@arlimus arlimus merged commit dcdd4ce into main Jul 31, 2025
17 checks passed
@arlimus arlimus deleted the dom/named-action branch July 31, 2025 15:57
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants