# quick-security-headers-check

> Utilising the [check-my-headers library](https://github.com/UlisesGascon/check-my-headers/blob/master/README.md), this a check to be used either locally on a machine, or in a GitHub Action.

Latest version **1.0.1** (published 2022-02-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install quick-security-headers-check
pnpm add quick-security-headers-check
yarn add quick-security-headers-check
bun add quick-security-headers-check
```

Provides the command `headers-check`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-02-20 |
| First published | 2022-02-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 2.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | audreybudryte |

## Links

- npm: https://www.npmjs.com/package/quick-security-headers-check
- npm.io page: https://npm.io/package/quick-security-headers-check

## Dependencies (5)

- [g](https://npm.io/package/g.md) ^2.0.1
- [@actions/core](https://npm.io/package/@actions/core.md) ^1.6.0
- [@actions/github](https://npm.io/package/@actions/github.md) ^5.0.0
- [check-my-headers](https://npm.io/package/check-my-headers.md) 0.1.1
- [quick-security-headers-check](https://npm.io/package/quick-security-headers-check.md) ^1.0.0

## Recent versions

- 1.0.1 (latest) — 2022-02-20
- 1.0.0 — 2022-02-20

## README

# Security Headers Check

Utilising the [check-my-headers library](https://github.com/UlisesGascon/check-my-headers/blob/master/README.md), this a check to be used either locally on a machine, or in a GitHub Action.


## Locally
### Install
Install npm package:

    npm install -g quick-security-headers-check

### Running
Once installed, checks can be made for headers of any URL with the following command:

    headers-check https://<VALID_URL>
### Removing
To uninstall: 

    npm uninstall -g quick-security-headers-check


## CI / GitHub Action
On open PR:
 1. Check headers of a given URL.
 2. Report back findings to a PR comment.

A working sample of a GitHub Action workflow can be found [here](https://github.com/AudreyBudryte2/security-headers/blob/main/.github/workflows/security-headers-check.yml).
### Implementation
The below should be placed in a yml file under .github/workflows/security-header-check.yml:

    name: security-headers-check
    on:
      pull_request:
        types: [opened]
    
    jobs: 
     security-headers-check:
     
      runs-on : ubuntu-latest
      
      name : Check headers for violations of security best practises
      
      steps:
        - name : Security headers check
          id : headerscheck
          uses: AudreyBudryte2/security-headers@v2
          with:
           url: 'https://<CHANGE_ME>'
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    
        - name: Comment results of security headers check
          uses: mb2dev/github-action-comment-pull-request@1.0.0
          with:
            message: "${{steps.headerscheck.outputs.header-issues}}"
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Insert the URL that should scanned here:

    url: 'https://<CHANGE_ME>'

---
_Source: https://npm.io/package/quick-security-headers-check · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
