Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
circleci-coverage_reporter
Advanced tools
CircleCI::CoverageReporter reports test coverage to your GitHub repository.
Add CircleCI::CoverageReporter to your Gemfile
and bundle install
:
gem 'circleci-coverage_reporter', group: :test
Load circleci/coverage_reporter/rake_task
in your Rakefile
:
require 'circleci/coverage_reporter/rake_task' if ENV['CIRCLECI']
Issue CircleCI and GitHub tokens and add them to build environment variables as follows:
Name | Value |
---|---|
COVERAGE_REPORTER_CIRCLECI_TOKEN | CircleCI API token with "view-builds" scope |
COVERAGE_REPORTER_VCS_TOKEN | GitHub personal access token with "repo" or "public_repo" scope |
Add the following step to your circle.yml
:
test:
post:
- bundle exec rake circleci:report_coverage
You must configure circleci_token
and vcr_token
before CircleCI::CoverageReporter.run
:
CircleCI::CoverageReporter.configure do |config|
config.circleci_token = YOUR_CIRCLECI_API_TOKEN
config.vcr_token = YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
end
CircleCI::CoverageReporter.run
CircleCI::CoverageReporter::Reporters::SimpleCovReporter
handles coverage files generated by
SimpleCov.
It expects that coverage files are located in $CIRCLE_ARTIFACTS/coverage
directory:
# spec/spec_helper.rb
require 'simplecov'
# Save to CircleCI's artifacts directory if we're on CircleCI
SimpleCov.coverage_dir(File.join(ENV['CIRCLE_ARTIFACTS'], 'coverage')) if ENV['CIRCLECI']
SimpleCov.start
If you put files in another directory, say $CIRCLE_ARTIFACTS/foo/bar
, you have to set reporter as follows:
CircleCI::CoverageReporter.configure do |config|
config.reporters << CircleCI::CoverageReporter::Reporters::SimpleCov.new(dir: 'foo/bar')
end
CircleCI::CoverageReporter::Reporters::FlowReporter
handles coverage files generated by
flow-coverage-report
It expects that there is $CIRCLE_ARTIFACTS/flow-coverage/flow-coverage.json
:
$(npm bin)/flow-coverage-report -t json -o $CIRCLE_ARTIFACTS/flow-coverage
If you put the file in another path, say $CIRCLE_ARTIFACTS/foo/bar/flow-coverage.json
,
you have to set reporter as follows:
CircleCI::CoverageReporter.configure do |config|
config.reporters << CircleCI::CoverageReporter::Reporters::Flow.new(dir: 'foo/bar')
end
CircleCI::CoverageReporter::Reporters::RubyCritic
handles code quality files generated by
rubycritic
bundle exec rubycritic -p $CIRCLE_ARTIFACTS/rubycritic -f json --no-browser --mode-ci app
bundle exec rubycritic -p $CIRCLE_ARTIFACTS/rubycritic -f html --no-browser --mode-ci app
CircleCI::CoverageReporter::Reporters::Link
reports a link to an artifact file.
CircleCI::CoverageReporter.configure do |config|
config.reporters << CircleCI::CoverateReporter::Reporters::Link.new(path: 'path/to/file', name: 'NAME')
end
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that circleci-coverage_reporter 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.