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.
This is a wrapper for the Sophos Central Partner API. You can see the API endpoints here https://developer.sophos.com/getting-started
Currently only the GET requests to customers, endpoints and alerts are implemented (readonly).
Add this line to your application's Gemfile:
gem 'sophos_central_api'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install sophos_central_api
Before you start making the requests to API provide the client id and client secret and email/password using the configuration wrapping.
require 'sophos_central_api'
Sophos.configure do |config|
config.client_id = ENV["SOPHOS_CLIENT_ID"]
config.client_secret = ENV["SOPHOS_CLIENT_SECRET"]
end
@client = Sophos.client()
@client.login
tenants = @client.tenants
tenants.each do |t|
puts "#{t.name}"
end
# setup configuration
#
client.login
Resource | API endpoint | Description |
---|---|---|
.login |
Endpoint for partner related requests
roles = client.roles
Resource | API endpoint |
---|---|
.tenants, .tenant(id) | /partner/v1/tenants/{id} |
.roles, .role(id) | /partner/v1/roles/{id} |
.admins, .admin(id) | /partner/v1/admins/{id} |
.admin_role_assignments(admin_id) | /partner/v1/admins/{admin_id}/role-assignments |
.admin_role_assignment(admin_id,assignment_id) | /partner/v1/admins/{admin_id}/role-assignments/{assignment_id} |
.permission_sets | /partner/v1/roles/permission-sets |
.billing_usage(year, month) | /partner/v1/billing-usage/{year}/{month} |
This is the OAS 3.0 specification for the Common API in Sophos Central.
@client = Sophos.client()
@client.login
:
tenant = @client.tenant(id)
# create client for tenant
@client.client(tenant).endpoints
Resource | API endpoint |
---|---|
.alerts, .alert(id) | .../alerts/ |
.directory_user_groups, .directory_user_groups(id) | .../directory/user-groups |
.directory_user_group_users(id) | .../directory/user-groups/{id}/users |
.directory_users, .directory_user(id) | .../directory/users |
.directory_user_groups(id) | .../directory/users/{id}/groups |
Returns endpoint for a provided tenant
@client = Sophos.client()
@client.login
:
tenant = @client.tenant(id)
@client.tenant(tenant).endpoints
Resource | API endpoint |
---|---|
.downloads | .../downloads/ |
.endpoint_groups, .endpoint_group(id) | .../endpoint-groupss/ |
.migrations, .migration(id) | .../migrations |
.migration_endpoints(migration_id) | .../migrations/{migration_id}/endpoints |
.policies, .policy(id) | .../policies/{id} |
.endpoints | .../endpoints |
.endpoint_isolation(endpoint_id) | .../endpoints/{id}/isolation |
.endpoint_tamper_protection(endpoint_id) | .../endpoints/{id}/tamper-protection |
Bug reports and pull requests are welcome on GitHub at https://github.com/jancotanis/sophos.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that sophos_central_api 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.