
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Generate Apple Passbook passes in Ruby
Passifier does most of the hard work and will more easily allow you to automate generating pkpass files. You simply supply
Add this line to your application's Gemfile:
gem 'passifier'
First, supply a bunch of pass information and styling. This will become the file pass.json within the pass archive. More information on pass.json and creating a layout can be found at developers.apple.com.
serial_number = "SO_SERIAL"
spec = {
"formatVersion": 1,
"passTypeIdentifier": "pass.example.example",
"teamIdentifier": "METS",
"relevantDate": "2012-07-30T14:19Z",
"organizationName": "Example Inc.",
"serialNumber": serial_number,
"description": "The example pass from README.md",
"labelColor": "rgb(122, 16, 38)",
"backgroundColor": "rgb(227, 227, 227)",
"foregroundColor": "rgb(110,110,110)",
"generic": {
"headerFields": [
{
"key": "date",
"label": "Date",
"value": "October 30th"
}
],
"primaryFields": [
{
"key": "title",
"label": "",
"value": "Passifier!"
}
],
"secondaryFields": [
{
"key": "host",
"label": "Host",
"value": "paperlesspost.com",
}
]
}
}
Specify a Hash of images. Notice that you can use either paths or urls here.
assets = {
"background.png": "assets/background.png",
"background@2x.png": "assets/background@2x.png",
"icon.png": "assets/icon.png",
"icon@2x.png": "assets/icon@2x.png",
"logo.png": "http://i.imgur.com/WLUf6.png",
"logo@2x.png": "http://i.imgur.com/mOpQo.png",
"thumbnail.png": "assets/thumbnail.png",
"thumbnail@2x.png": "assets/thumbnail@2x.png"
}
Give Passifier some info about your .pem
files.
To get your certificates and keys in order, follow these steps:
.cer
file you're given to your keychainCertificates.p12
, create a secure password when promptedopenssl pkcs12 -in Certificates.p12 -clcerts -nokeys -out certificate.pem -passin pass:<THAT_SECRET_PASSWORD>
openssl pkcs12 -in Certificates.p12 -nocerts -out key.pem -passin pass:<THAT_SECRET_PASSWORD> -passout pass:<ANOTHER_SECRET_PASSWORD>
Download the Worldwide Developer Relations
certificate and export it as a .pem
file to include in the signature.
key_pem = "path/to/a/key.pem"
pass_phrase = "<ANOTHER_SECRET_PASSWORD>"
cert_pem = "path/to/a/certificate.pem"
wwdr_pem = "path/to/the/wwdr_certificate.pem"
# Create a Signing object
signing = Passifier::Signing.new(key_pem, pass_phrase, cert_pem, wwdr_pem)
Now it's time to create your pass.
Passifier::Pass.generate("readme.pkpass", serial_number, spec, assets, signing)
Passifier will have created the file readme.pkpass
for you. When opened in Passbook, that pass looks something like:
Copyright © 2012 Paperless Post. See LICENSE.md for details.
FAQs
Unknown package
We found that passifier-rails 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.