Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@cannery/hoist
Advanced tools
Upload and host static websites in Google Storage Buckets.
yarn global add @cannery/hoist
# or
npm install -g @cannery/hoist
Hoist understands, and automatically pre-processes for production, the following file types out of the box:
All other files discovered are uploaded as-is to the hosting provider. All files are gzipped as they are uploaded and appropriate cache-key headers are set.
Hoist comes with just two commands:
$ hoist up [root] [subdirectory] [bucket_name]
$ hoist down
$ hoist serve directory [port]
hoist up
will make your site public to the world. If you pass a directory root as the second CLI argument it will upload that directory to your production site. You can optionally pass a subdirectory to only upload that subdirectory to remote, and a bucket name other than the one specified in your gcloud.json
auth file (see below) to select an alternate GCS bucket to upload to.
hoist down
will make your site private, nobody will be able to see files in the Google Storage Bucket.
hoist serve
will serve your site locally over SSL for you to preview. If you pass a preferred port Hoist will use the provided port if available.
When you run Hoist from the CLI, it will crawl up directories until it finds a gcloud.json
file with the Service Account Key and attempt to use it for authentication.
Hoist needs a Service Account and a Service Account Key with Storage Bucket management permissions to operate.
You may optionally include a cloudflare_token
to automatically clear your CDN cache on upload. This token must be granted Zone.Zone
read access and Zone.Cache Purge
permissions for relevant DNS Zones.
You may optionally include a test_domain
to configure the local domain that hoist serve
uses. By default it will make the site available at https://hoist.test
.
To configure the bucket that the site will upload to by default, add a single bucket
field to this gcloud.json
file with the target bucket name.
Once configured, your gcloud.json
file should look something like this:
{
"type": "service_account",
"project_id": "projectid",
"bucket": "bucketname.com",
"test_domain": "appname.test",
"cloudflare_token": "01234567890123456789",
"private_key_id": "01234567890123456789",
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"client_email": "name@projectid.iam.gserviceaccount.com",
"client_id": "01234567890123456789",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/name%40projectid.iam.gserviceaccount.com"
}
FAQs
DIY Static Website Hosting
The npm package @cannery/hoist receives a total of 9 weekly downloads. As such, @cannery/hoist popularity was classified as not popular.
We found that @cannery/hoist 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.