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 simple Tabu Search framework
Add this line to your application's Gemfile:
gem 'tabu_search'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tabu_search
Require methods:
Class#genome
Support dupClass#genome=
Class#fitness
Current unit fitness, the bigger than betterClass#search_neighbour(ts)
Search some neighbour unitsClass#step(ts, data)
Update unit and TS contextExample:
class Unit
include TabuSearch
LEN = 5
attr_accessor :genome
def initialize(genome)
@genome = genome.dup
end
def fitness
val = genome.join.to_i(2)
return 0 if val > 10
10 * val - val * 3 + val ** 2
end
def step(ts, data)
id, index, val, new_fitness = data
genome[index] = val
ts.update(id, genome, new_fitness)
end
def search_neighbour(ts)
LEN.times.map do |i|
origin = genome[i]
new_val = 1 - origin
genome[i] = new_val
new_fitness = fitness
genome[i] = origin
["#{i}-#{new_val}", i, new_val, new_fitness]
end
end
end
# Class.tabu_search(instance, times, tabu_size)
Unit.tabu_search(Unit.new([1,2,3]), 10, 10)
# or
Unit.new_ts_ctx(10).search(Unit.new([1,2,3]), 10)
Bug reports and pull requests are welcome on GitHub at https://github.com/xjz19901211]/tabu_search.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that tabu_search 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
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.