
Security News
GitHub Actions Supply Chain Attack Puts Thousands of Projects at Risk
A compromised GitHub Action exposed secrets in CI/CD logs, putting thousands of projects at risk and forcing developers to urgently secure their workflows.
chrome-api-definitions
Advanced tools
Definition generator for Chrome Platform APIs.
Uses the Chromium extension definitions (both common and chrome definitions) for the Chrome Platform APIs and constructs a manifest of all available platform APIs for extensions.
While the original manifests defines permissions, allowable contexts, and other metadata describing the namespace (sometimes a specific method inside a namespace also has this meta), the full definition of the available methods, types and objects exposed in the API is defined by either JSON or (Blink's version of) WebIDL. This constructs a structure listing all available APIs with their appropriate meta from the manifest, as well as the available entities inside of that namespace.
Parsing the Blink WebIDL here is a horrible hack to get it similar to the APIs with JSON definitions, but gets us close enough.
Pretty much an array of all specified APIs (by filter
config), using the JSON definitions from Chromium if they exist, or otherwise using the WebIDL version for something that attempts to get pretty close.
Root APIs (like alarms
or devtools.inspectedWindow
) also now have properties of permissions
and content_script
, if these were defined in the Chromium manifest, for example:
{
"namespace": "storage",
"dependencies": ["permission:storage"],
"content_script": true
}
When defined in the manifest, an API's methods can also have this additional information (only runtime
and extensions
API have individual methods in the manifest, AFAIK).
{
"namespace": "runtime",
...
"functions": [{
"name": "sendMessage",
"content_script": true
}, {
...
}]
}
View built output of stable APIs for the most illumination.
Returns the definition for the specified APIs as an object. Options:
filter
- provide an array of namespaces to filter by, or use a string to specify a preset in api-names.json
. Defaults to the preset "stable"
.apiRoot
- path to the directory containing both common
and chrome
APIs. Uses the directory in ./api
by default. Not tested.Same as getDefinitions()
except it just saves to disk. Takes the same options as getDefinitions()
, plus:
dest
- path of where the definition should be saved.For chrome-api-defintions: MIT License, Copyright (c) 2015 Jordan Santell
For API manifests from Chromium source: Modified BSD License, Copyright 2014 The Chromium Authors. All rights reserved.
FAQs
Consolidated definitions for Chrome Platform APIs
The npm package chrome-api-definitions receives a total of 3 weekly downloads. As such, chrome-api-definitions popularity was classified as not popular.
We found that chrome-api-definitions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A compromised GitHub Action exposed secrets in CI/CD logs, putting thousands of projects at risk and forcing developers to urgently secure their workflows.
Research
Security News
A malicious Maven package typosquatting a popular library is secretly stealing OAuth credentials on the 15th of each month, putting Java developers at risk.
Security News
Socket and Seal Security collaborate to fix a critical npm overrides bug, resolving a three-year security issue in the JavaScript ecosystem's most popular package manager.