![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
The Trackablaze gem is both the official repository of trackers for Trackablaze as well as a stand-alone tool to execute trackers from the command line. The website and the gem are kept in version sync, so any recipes released to the gem will be simultaneously available on the web builder.
Installation is simple:
gem install trackablaze
'trackablaze' lets you track web metrics. For example, the Twitter tracker lets you find metrics about a specific Twitter account - metrics such as number of followers, number of friends, etc. Depending on the tracker used either only public information is available or authenticated information is available through oauth.
The command line take a configuration yaml file and executes trackers listed in it.
trackablaze track sample.yml
Contents of sample.yml
- twitter:
params:
handle: amolk
metrics:
- followers_count
- friends_count
- facebook_page:
params:
page_id: 125602120804573
- twitter:
params:
handle: msuster
This will output twitter metrics for the two twitter handles (amolk, msuster) and metrics for the facebook page specified. If a list of metrics is specified, such as for the first twitter tracker, those specific metrics are listed in the output. Otherwise, the default set of metrics are reported.
Output
--------------------------------[ Twitter ]--------------------------------
params: {"handle"=>"amolk"}
results: {"followers_count"=>25, "friends_count"=>29}
-----------------------------[ Facebook page ]-----------------------------
params: {"page_id"=>125602120804573}
results: {"likes"=>13}
--------------------------------[ Twitter ]--------------------------------
params: {"handle"=>"msuster"}
results: {"followers_count"=>35836}
Trackablaze trackers collection is available in this GitHub repository. Feel free to fork and improve. You can see all of the trackers in the trackers directory.
Submitting a tracker is actually a very straightforward process. Trackers are made of up of a YAML config file and a ruby code file.
title: 'Twitter'
params:
handle:
name: 'Twitter handle'
description: 'This is the Twitter username'
type: string
metrics:
followers_count:
name: 'Followers count'
default: true
friends_count:
name: 'Friends count'
require 'twitter'
module Trackablaze
class Twitter < Tracker
def get_metrics(tracker_items)
tracker_items.collect {|tracker_item| get_metrics_single(tracker_item)}
end
def get_metrics_single(tracker_item)
metrics = {}
if (tracker_item.params["handle"].nil? || tracker_item.params["handle"].empty?)
add_error(metrics, "No handle supplied", "handle")
return metrics
end
user = nil
begin
user = ::Twitter.user(tracker_item.params["handle"])
rescue
end
if (user.nil?)
add_error(metrics, "Invalid handle supplied", "handle")
return metrics
end
tracker_item.metrics.each do |metric|
metrics[metric] = user[metric]
end
metrics
end
end
end
A tracker must implement get_metrics() method. This method takes in an array of tracker items (i.e. configurations). Your tracker may choose to query for each tracker item one by one or use any available optimized API calls. For example, the above code queries Twitter API once for each user handle, but can be optimized by using the ::Twitter.users API call that takes an array of user handles.
It's really that simple. The gem has RSpec tests that automatically
validate each tracker in the repository, so you should run rake spec
as a basic sanity check before submitting a pull request. Note that
these don't verify that your tracker code itself works, just that
Trackablaze could properly load your tracker file and the the config
file is valid.
For more information on all available options for authoring trackers, please see the wiki.
Trackablaze and its recipes are distributed under the MIT License.
FAQs
Unknown package
We found that trackablaze 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.