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.
activerecord-redshift-adapter
Advanced tools
adapter for aws redshift for rails 3
Ripped from rails 3 postgresql.
common: &common
adapter: postgresql
username: postgres
encoding: SQL_ASCII
template: template0
pool: 5
timeout: 5000
redshiftdb: &redshiftdb
adapter: redshift
host: clustername.something.us-east-1.redshift.amazonaws.com
database: databasename
port: 5439
username: username
password: password
redshift_development:
<<: *common
<<: *redshiftdb
database: databasename
<table>
<tr>
<th>option</th>
<th>description</th>
</tr>
<tr>
<th>schema_search_path</th>
<td>set schema_search_path. use default value if not given.</td>
</tr>
<tr>
<th>read_timezone</th>
<td>force timezone for datetime when select values. ActiveRecord default timezone will set if not given.</td>
</tr>
</table>
https://github.com/fiksu/partitioned
Helpful code to clone redshift tables
create table foos
(
id int not null primary key distkey,
name varchar(255) unique sortkey
);
class Foo < ActiveRecord::Base
end
require 'activerecord_redshift_adapter'
table_manager = ActiverecordRedshift::TableManager.new(Foo.connection, :exemplar_table_name => Foo.table_name)
table_manager.duplicate_table
yields:
select oid from pg_namespace where nspname = 'public' limit 1;
select oid,reldiststyle from pg_class where relnamespace = 2200 and relname = 'foos' limit 1;
select contype,conkey from pg_constraint where connamespace = 2200 and conrelid = 212591;
select attname,attnum from pg_attribute where attrelid = 212591 and attnum in (2,1);
show search_path;
set search_path = 'public';
select * from pg_table_def where tablename = 'foos' and schemaname = 'public';
create temporary table temporary_events_25343
(
id integer not null distkey,
name character varying(255),
primary key (id),
unique (name)
) sortkey (name);
set search_path = '$user','public';
FAQs
Unknown package
We found that activerecord-redshift-adapter 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.