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.
rm -rf build dist
python3 setup.py sdist bdist_wheel
twine upload --repository pypi dist/*
pip install afl-ai-utils
from afl_ai_utils.slack_alerts import send_slack_alert
send_slack_alert(info_alert_slack_webhook_url=None, red_alert_slack_webhook_url=None, slack_red_alert_userids=None, payload=None, is_red_alert=False)
"""Send a Slack message to a channel via a webhook.
Args:
info_alert_slack_webhook_url(str): Infor slack channel url
red_alert_slack_webhook_url(str): red alert channel url
slack_red_alert_userids (list): userid's to mention in slack for red alert notification
payload (dict): Dictionary containing Slack message, i.e. {"text": "This is a test"}
is_red_alert (bool): Full Slack webhook URL for your chosen channel.
Returns:
HTTP response code, i.e. <Response [503]>
"""
def dump_dataframe_to_bq_table(self, dataframe: pd.DataFrame, schema_cols_type: dict, table_id: str, mode: str):
>>> from afl_ai_utils.bigquery_utils import BigQuery
>>> bq = BigQuery("keys.json")
>>> bq.write_insights_to_bq_table(dataframe=None, schema=None, table_id=None, mode=None)
"""Insert a dataframe to bigquery
Args:
dataframe(pandas dataframe): for dataframe to be dumped to bigquery
schema(BigQuery.Schema ): ex:
schema_cols_type: {"date_start":"date", "id": "integer", "name": "string"}
table_id (list): table_id in which dataframe need to be inserted e.g project_id.dataset.table_name = table_id
mode(str): To append or replace the table - e.g mode = "append" or mode="replace"
Returns:
returns as success message with number of inserted rows and table name
"""
def execute_query(self, query):
>>> from afl_ai_utils.bigquery_utils import BigQuery
>>> bq = BigQuery("keys.json")
>>> df = bq.execute_query(query = "SELECT * FROM TABLE")
"""
Args:
query (query of any type SELECT/INSERT/DELETE )
Returns:
returns dataframe of execute query result
"""
FAQs
A sample test package
We found that afl-ai-utils 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.
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.