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

rfc138 npm audit metadata appended to headers #1670

Closed
wants to merge 4 commits into from
Closed

rfc138 npm audit metadata appended to headers #1670

wants to merge 4 commits into from

Conversation

doddi
Copy link

@doddi doddi commented Aug 13, 2020

Following on from discussion against rfc-0027 this PR allows metadata from package.json to be appended to the header of the npm audit requests

Some third party application require more details for auditing, such is Nexus Lifecycle. This application applies policy against an application, an application may have different policies.
This change allows a metadata object contained in the projects package.json file to be transmitted as a header definition.

Example

{
  "name": "npm_project",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "qs": "^2.4.2"
  },
  "metadata": {
    "npm-app-id": "helloapp"
  }
}

This example will add a metadata key to the http request header with a JSON.stringify representation of the metadata object.

@doddi doddi closed this Aug 13, 2020
@doddi doddi deleted the rfc_138-npm_audit_app_id branch August 13, 2020 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant