Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Ticketbai is a gem that gives you the ability to generate Ticketbai files and upload them to the Regional Treasury (currently only Bizkaia is supported)
Add this line to your application's Gemfile:
gem 'ticketbai'
Then run:
bundle install
And then execute:
$ bundle install
Or install it yourself as:
$ gem install ticketbai
Encode your certificate to be able to add the resulting string to the secrets file:
certificate = File.read('path/my-certificate.pfx')
encoded_certificate = Base64.strict_encode64(certificate)
Add the encoded_certificate string, the key and the rest of your ticketbai license params to the secrets file:
ticketbai:
license_key: xxxxxxxxxx
app_name: xxxxxxxxxx
app_version: xxxxxxxxxx
developer_company_nif: xxxxxxxxxx
certificates:
my_certificate_name:
cert: encoded_certificate string
key: xxxxxxxxxx
The supported TicketBAI operations are: issuance, annulment and issuance unsigned.
Ticketbai::Operations::Issuance.new(
company_cert: 'my_certificate_name',
issuing_company_nif: 'B34576372',
issuing_company_name: 'FooBar SL',
invoice_serial: '2022',
invoice_number: '10001',
invoice_date: '11-01-2022',
invoice_time: '13:05:22',
invoice_description: 'La descripción de la factura',
invoice_total: 12.21,
invoice_vat_key: '01',
invoice_amount: 11.0,
invoice_vat: 21.0,
invoice_vat_total: 2.31,
simplified_invoice: true
).create
If everything is ok, the response of Ticketbai::Operations::Issuance.new(params).create
is a Hash with two keys:
Ticketbai::Operations::Annulment.new(
issuing_company_nif: 'B12345678',
issuing_company_name: 'Test SL',
invoice_serial: '2022',
invoice_number: '000002',
invoice_date: '10-11-2022',
company_cert: 'my_certificate_name'
).create
Sending the TicketBAI files to the LROE is done by executing the following request to the API:
Ticketbai::Api::Request.new(
issued_invoices: xml_doc,
nif: 'B34576372',
company_name: 'FooBar SL',
certificate_name: 'my_certificate_name',
year: '2022',
operation: :issuance
).execute
Bug reports and pull requests are welcome on GitHub at https://github.com/ecommerce-ventures/ticketbai.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that ticketbai 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.