Skip to content

Commit e317284

Browse files
author
Diego Nadares
committed
Merge branch 'refs/heads/white/staging' into white/master
2 parents d220e44 + 00c6bec commit e317284

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2973
-1156
lines changed

CHANGELOG/5.13.0/community.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* [FIX] Fixed sync host stats command to update workspaces statistics. #7943
2+
* [ADD] Adds support for vulnerability status changes on report upload. #7903
3+
* [FIX] Enhanced workspace performance by pre-calculating statistics, reducing the overhead of on-demand calculations during data retrieval. #7780
4+
* [ADD] Introduced support for RabbitMQ as a task processing broker. #7866
5+
* [ADD] Added filtering to schedulers view. #7857
6+
* [MOD] Rework the Credential API. #7912
7+
* [ADD] Added Idle Session Timeout feature. #7876
8+
* [MOD] Redesigned the Credential Model to work more closely with vulnerabilities. #7911
9+
* [FIX] Improve vulnerability count on contextual view. #7901
10+
* [FIX] Calculate stats as soon as file reports are uploaded. #7937

CHANGELOG/5.13.0/date.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Apr 24th, 2025

RELEASE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
New features in the latest update
22
=====================================
33

4+
5.13.0 [Apr 24th, 2025]:
5+
---
6+
* [ADD] Added support for vulnerability status changes on report upload. #7903
7+
* [ADD] Introduced support for RabbitMQ as a task processing broker. #7866
8+
* [ADD] Added filtering to schedulers view. #7857
9+
* [ADD] Added Idle Session Timeout feature. #7876
10+
* [MOD] Rework the Credential API. #7912
11+
* [MOD] Redesigned the Credential Model to work more closely with vulnerabilities. #7911
12+
* [FIX] Fixed sync host stats command to update workspaces statistics. #7943
13+
* [FIX] Enhanced workspace performance by pre-calculating statistics, reducing the overhead of on-demand calculations during data retrieval. #7780
14+
* [FIX] Improved vulnerability count on contextual view. #7901
15+
* [FIX] Stats are now calculated automatically upon file report upload. #7937
16+
417
5.12.0 [Mar 13th, 2025]:
518
---
619
* [ADD] Added update in bulk mode for workspaces. #7830

architecture.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Faraday Architecture
2+
3+
Faraday is a comprehensive security platform that combines a Flask-based API with background task processing capabilities. The system is designed to handle both synchronous HTTP requests and real-time WebSocket communications, while efficiently processing long-running tasks through a distributed worker system.
4+
5+
## System Overview
6+
7+
```ascii
8+
+------------------+
9+
| |
10+
| Clients |
11+
| - API Clients |
12+
| - Cloud Agents |
13+
| - Faraday Agents|
14+
| - Faraday-cli |
15+
| - Faraday's |
16+
| React UI |
17+
| |
18+
+------------------+
19+
|
20+
v
21+
+------------------+ +------------------+ +------------------+
22+
| | | | | |
23+
| Faraday Flask | | Message Broker | | Faraday Workers |
24+
| API |<--->| (Redis/RabbitMQ) |<--->| (Celery) |
25+
| (HTTP/WS) | | | | |
26+
+------------------+ +------------------+ +------------------+
27+
| |
28+
| |
29+
v v
30+
+------------------+ +------------------+
31+
| | | |
32+
| PostgreSQL | | Long Tasks: |
33+
| Database | | - Exec Reports |
34+
| | | - Scan Imports |
35+
| | | - Stats Gen |
36+
+------------------+ +------------------+
37+
```
38+
39+
## Components
40+
41+
- **Faraday Flask API**: Main application server handling HTTP and WebSocket requests
42+
- **Message Broker**: Queue system (Redis/RabbitMQ) for task distribution
43+
- **Faraday Workers**: Celery workers processing background tasks
44+
- **PostgreSQL**: Primary database for data storage
45+
- **Long Tasks**: Background jobs processed by workers
46+
- **Clients**: Various client interfaces including:
47+
- API Clients: External applications using Faraday's API
48+
- Cloud Agents: Cloud-based agents for distributed task execution
49+
- [Faraday Agents](https://github.com/infobyte/faraday_agent_dispatcher): Local agents for task execution
50+
- [Faraday-cli](https://github.com/infobyte/faraday-cli): Command-line interface
51+
- Faraday's React UI: Web-based user interface

faraday/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
See the file 'doc/LICENSE' for the license information
55
"""
66

7-
__version__ = '5.12.0'
7+
__version__ = '5.13.0'
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
"""rework credentials
2+
3+
Revision ID: 39ddd3ca3a20
4+
Revises: 618a59151523
5+
Create Date: 2025-02-18 15:17:51.883711+00:00
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '39ddd3ca3a20'
14+
down_revision = '615a6fdd9af4'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
21+
op.execute('DROP TABLE IF EXISTS credential')
22+
op.create_table('credential',
23+
sa.Column('id', sa.Integer(), nullable=False, autoincrement=True, primary_key=True),
24+
sa.Column('password', sa.Text(), nullable=False),
25+
sa.Column('username', sa.Text(), nullable=False),
26+
sa.Column('endpoint', sa.Text(), nullable=False, server_default=''),
27+
sa.Column('leak_date', sa.DateTime(), nullable=True),
28+
sa.Column('owned', sa.Boolean(), nullable=False, server_default='false'),
29+
sa.Column('workspace_id', sa.Integer(), nullable=False),
30+
sa.Column('create_date', sa.DateTime(), nullable=False),
31+
sa.Column('update_date', sa.DateTime(), nullable=False),
32+
sa.Column('creator_id', sa.Integer(), nullable=True),
33+
sa.Column('update_user_id', sa.Integer(), nullable=True),
34+
sa.ForeignKeyConstraint(['creator_id'], ['faraday_user.id'], ondelete='SET NULL'),
35+
sa.ForeignKeyConstraint(['update_user_id'], ['faraday_user.id'], ondelete='SET NULL'),
36+
sa.ForeignKeyConstraint(['workspace_id'], ['workspace.id'], ondelete='CASCADE'),
37+
sa.UniqueConstraint('username', 'password', 'endpoint', 'workspace_id',
38+
name='uix_credential_username_password_endpoint_workspace'),
39+
sa.CheckConstraint("username != ''", name="check_username_not_empty"),
40+
sa.CheckConstraint("password != ''", name="check_password_not_empty")
41+
)
42+
43+
op.create_index('ix_credential_leak_date', 'credential', ['leak_date'])
44+
op.create_index('ix_credential_leak_date_workspace_id', 'credential', ['workspace_id', 'leak_date'])
45+
46+
op.create_table('association_table_vulnerabilities_credentials',
47+
sa.Column('vulnerability_id', sa.Integer(), nullable=False),
48+
sa.Column('credential_id', sa.Integer(), nullable=False),
49+
sa.ForeignKeyConstraint(['credential_id'], ['credential.id'], ondelete='CASCADE'),
50+
sa.ForeignKeyConstraint(['vulnerability_id'], ['vulnerability.id'], ondelete='CASCADE')
51+
)
52+
53+
op.create_index('ix_association_vuln_creds_vuln_id',
54+
'association_table_vulnerabilities_credentials',
55+
['vulnerability_id'])
56+
57+
op.create_index('ix_association_vuln_creds_cred_id',
58+
'association_table_vulnerabilities_credentials',
59+
['credential_id'])
60+
61+
62+
def downgrade():
63+
op.drop_index('ix_association_vuln_creds_vuln_id',
64+
table_name='association_table_vulnerabilities_credentials')
65+
op.drop_index('ix_association_vuln_creds_cred_id',
66+
table_name='association_table_vulnerabilities_credentials')
67+
68+
op.drop_table('association_table_vulnerabilities_credentials')
69+
70+
op.drop_index('ix_credential_leak_date_workspace_id', table_name='credential')
71+
op.drop_index('ix_credential_leak_date', table_name='credential')
72+
op.drop_table('credential')
73+
# Recreate the old table to restore the previous schema during downgrade
74+
op.create_table('credential',
75+
sa.Column('id', sa.Integer(), nullable=False),
76+
sa.Column('username', sa.Text(), nullable=False),
77+
sa.Column('password', sa.Text(), nullable=False),
78+
sa.Column('description', sa.Text(), nullable=False),
79+
sa.Column('name', sa.Text(), nullable=True),
80+
sa.Column('host_id', sa.Integer(), nullable=True),
81+
sa.Column('service_id', sa.Integer(), nullable=True),
82+
sa.Column('workspace_id', sa.Integer(), nullable=False),
83+
sa.ForeignKeyConstraint(['host_id'], ['host.id'], ondelete='CASCADE'),
84+
sa.ForeignKeyConstraint(['service_id'], ['service.id'], ondelete='CASCADE'),
85+
sa.ForeignKeyConstraint(['workspace_id'], ['workspace.id'], ondelete='CASCADE'),
86+
sa.PrimaryKeyConstraint('id'),
87+
sa.UniqueConstraint(
88+
'username',
89+
'host_id',
90+
'service_id',
91+
'workspace_id',
92+
name='uix_credential_username_host_service_workspace'
93+
)
94+
)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""analytics user settings
2+
3+
Revision ID: 615a6fdd9af4
4+
Revises: f2435999bc54
5+
Create Date: 2025-04-01 15:26:42.904208+00:00
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
revision = '615a6fdd9af4'
13+
down_revision = 'f2435999bc54'
14+
branch_labels = None
15+
depends_on = None
16+
17+
18+
def upgrade():
19+
op.add_column('user_notification_settings', sa.Column('analytics_enabled', sa.Boolean(), nullable=False, server_default=sa.text('true')))
20+
op.add_column('user_notification_settings', sa.Column('analytics_app', sa.Boolean(), nullable=False, server_default=sa.text('true')))
21+
op.add_column('user_notification_settings', sa.Column('analytics_email', sa.Boolean(), nullable=False, server_default=sa.text('false')))
22+
op.add_column('user_notification_settings', sa.Column('analytics_slack', sa.Boolean(), nullable=False, server_default=sa.text('false')))
23+
24+
25+
def downgrade():
26+
op.drop_column('user_notification_settings', 'analytics_slack')
27+
op.drop_column('user_notification_settings', 'analytics_email')
28+
op.drop_column('user_notification_settings', 'analytics_app')
29+
op.drop_column('user_notification_settings', 'analytics_enabled')

0 commit comments

Comments
 (0)