Skip to content

Commit

Permalink
Add a HTTP security policy (#296)
Browse files Browse the repository at this point in the history
First take at a HTTP security policy to use the new resources

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 authored Nov 21, 2023
1 parent aa3da7c commit dae9ea0
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions core/mondoo-http-security.mql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

policies:
- uid: mondoo-http-security
name: HTTP Security
version: 1.0.0
license: BUSL-1.1
tags:
mondoo.com/category: security
mondoo.com/platform: network
authors:
- name: Mondoo, Inc
email: [email protected]
docs:
desc: |
## Overview
The HTTP Security by Mondoo policy includes checks for ensuring the security of HTTP headers.
## Remote scan
Remote scans use cnspec providers to retrieve on-demand scan results without having to install any agents.
For a complete list of providers run:
```bash
cnspec scan --help
```
### Scan a host
```bash
cnspec scan host <fqdn>
```
## Join the community!
Our goal is to build policies that are simple to deploy, accurate, and actionable.
If you have any suggestions for how to improve this policy, or if you need support, [join the community](https://github.com/orgs/mondoohq/discussions) in GitHub Discussions.
groups:
- title: Secure HTTP headers
filters: asset.platform == "host"
checks:
- uid: mondoo-http-security-x-content-type-options-nosniff
scoring_system: 2
queries:
- uid: mondoo-http-security-x-content-type-options-nosniff
title: Set X-Content-Type-Options HTTP header to 'nosniff'
mql: http.get.header.xContentTypeOptions == "nosniff"
docs:
desc: |
Avoid MIME Type sniffing by setting the 'X-Content-Type-Options' HTTP header to 'nosniff'
refs:
- url: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
title: MDN Web Docs X-Content-Type-Options

0 comments on commit dae9ea0

Please sign in to comment.