Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A lightweight API connector for docuseal. Docuseal API docs: https://www.docuseal.co/docs/api
:warning: The extracted API objects don't do input parameters validations. It's a simple faraday wrapper that allows you to send as many inputs as you want. The docuseal API might fail when passing a wrong set of parameters.
Install the gem and add to the application's Gemfile by executing:
$ bundle add docuseal
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install docuseal
You'll need to set the Docuseal API key in the configuration.
Docuseal.configure do |config|
config.api_key = "{DOCUSEAL_API_KEY}"
end
You can also set some other configurations like:
Docuseal.configure do |config|
config.api_key = "{DOCUSEAL_API_KEY}"
# Set the docuseal API request timeout, the default is 120 seconds
config.request_timeout = 20
# Set extra headers that will get attached to every docuseal api request.
# Useful for observability tools like Helicone: https://www.helicone.ai/
config.global_headers = {
"Helicone-Auth": "Bearer HELICONE_API_KEY"
"helicone-stream-force-format" => "true",
}
# Set the base_uri to use the docuseal EU servers if you're account was registered there.
# The default is https://api.docuseal.co/
config.base_uri = "https://api.docuseal.eu/"
end
Reference: https://www.docuseal.co/docs/api#list-all-submissions
submissions = Docuseal::Submission.list
Reference: https://www.docuseal.co/docs/api#get-a-submission
submission = Docuseal::Submission.find(1)
Reference: https://www.docuseal.co/docs/api#create-a-submission
submission = Docuseal::Submission.create(
template_id: 1000001,
send_email: true,
submitters: [{role: 'First Party', email: 'john.doe@example.com'}]
)
Reference: https://www.docuseal.co/docs/api#create-submissions-from-emails
submission = Docuseal::Submission.create(
from: :emails,
template_id: 1000001,
emails: 'hi@docuseal.co, example@docuseal.co'
)
Reference: https://www.docuseal.co/docs/api#archive-a-submission
submission = Docuseal::Submission.archive(1)
Reference: https://www.docuseal.co/docs/api#list-all-submitters
submitters = Docuseal::Submitter.list
Reference: https://www.docuseal.co/docs/api#get-a-submitter
submitter = Docuseal::Submitter.find(1)
Reference: https://www.docuseal.co/docs/api#update-a-submitter
submitter = Docuseal::Submitter.update(1,
email: 'john.doe@example.com',
fields: [{name: 'First Name', default_value: 'Acme'}]
)
Reference: https://www.docuseal.co/docs/api#list-all-templates
templates = Docuseal::Template.list
Reference: https://www.docuseal.co/docs/api#get-a-template
template = Docuseal::Template.find(1)
Reference: https://www.docuseal.co/docs/api#create-a-template-from-word-docx
template = Docuseal::Template.create(
from: :docx,
name: 'Demo DOCX',
documents: [{ name: 'Demo DOCX', file: 'base64' }]
)
Reference: https://www.docuseal.co/docs/api#create-a-template-from-html
template = Docuseal::Template.create(
from: :html,
html: '<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name="Industry"\n role="First Party"\n required="false"\n style="width: 80px; height: 16px; display: inline-block; margin-bottom: -4px">\n</text-field>\nand typesetting industry</p>\n',
name: 'Test Template'
)
Reference: https://www.docuseal.co/docs/api#create-a-template-from-existing-pdf
template = Docuseal::Template.create(
from: :pdf,
name: 'Test PDF',
documents: [
{
name: 'string',
file: 'base64',
fields: [{name: 'string', areas: [{x: 0, y: 0, w: 0, h: 0, page: 0}]}]
}
]
)
Reference: https://www.docuseal.co/docs/api#clone-a-template
template = Docuseal::Template.clone(1,
name: 'Clone of Test',
)
Reference: https://www.docuseal.co/docs/api#update-a-template
template = Docuseal::Template.update(1,
name: 'New Document Name',
folder_name: 'New Folder'
)
Reference: https://www.docuseal.co/docs/api#update-template-documents
template = Docuseal::Template.update_documents(1,
documents: [{file: 'base64'}]
)
Reference: https://www.docuseal.co/docs/api#archive-a-template
template = Docuseal::Template.archive(1)
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment:
$ DOCUSEAL_API_KEY={YOUR API KEY} DOCUSEAL_BASE_URI={YOUR BASE URI} bin/console
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/moraki-finance/docuseal. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Docuseal project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that docuseal demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.