-
Notifications
You must be signed in to change notification settings - Fork 930
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/white/staging' into white/master
- Loading branch information
Showing
22 changed files
with
228 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* [ADD] CVSS4 data is now included in CSV exports. #7850 | ||
* [ADD] Added support for CVSS v4 in bulk imports. #7849 | ||
* [FIX] Added authorization to the config endpoint. #7331 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Jan 6th, 2025 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
See the file 'doc/LICENSE' for the license information | ||
""" | ||
|
||
__version__ = '5.9.0' | ||
__version__ = '5.10.0' |
39 changes: 39 additions & 0 deletions
39
faraday/migrations/versions/391de8e3c453_condition_data_to_text.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"""condition data to text | ||
Revision ID: 391de8e3c453 | ||
Revises: 4423dd3f90be | ||
Create Date: 2024-12-05 18:36:41.627258+00:00 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '391de8e3c453' | ||
down_revision = '4423dd3f90be' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('condition', 'data', | ||
existing_type=sa.VARCHAR(length=50), | ||
type_=sa.Text(), | ||
existing_nullable=True) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# Truncate values that exceed 50 characters | ||
op.execute(""" | ||
UPDATE condition | ||
SET data = LEFT(data, 50) | ||
WHERE LENGTH(data) > 50 | ||
""") | ||
op.alter_column('condition', 'data', | ||
existing_type=sa.Text(), | ||
type_=sa.VARCHAR(length=50), | ||
existing_nullable=True) | ||
# ### end Alembic commands ### |
45 changes: 45 additions & 0 deletions
45
faraday/migrations/versions/7c223e63007f_add_service_desk_scope.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""add service desk scope | ||
Revision ID: 7c223e63007f | ||
Revises: 391de8e3c453 | ||
Create Date: 2024-08-14 15:18:41.873355+00:00 | ||
""" | ||
from alembic import op | ||
from faraday.server.models import UserToken | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '7c223e63007f' | ||
down_revision = '391de8e3c453' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
with op.get_context().autocommit_block(): | ||
op.execute("ALTER TYPE token_scopes ADD VALUE IF NOT EXISTS 'service_desk'") | ||
|
||
|
||
def downgrade(): | ||
op.execute("DELETE FROM user_token WHERE scope = 'service_desk'") | ||
|
||
scopes = [scope for scope in UserToken.SCOPES if scope != UserToken.SERVICE_DESK_SCOPE] | ||
|
||
scopes_str = ', '.join(f"'{scope}'" for scope in scopes) | ||
|
||
op.execute(f"CREATE TYPE token_scopes_tmp AS ENUM({scopes_str})") | ||
|
||
# Step 2: Alter the table to use the new enum type | ||
op.execute(""" | ||
ALTER TABLE user_token | ||
ALTER COLUMN scope | ||
SET DATA TYPE token_scopes_tmp | ||
USING scope::text::token_scopes_tmp | ||
""") | ||
|
||
# Step 3: Drop the old enum type | ||
op.execute("DROP TYPE token_scopes") | ||
|
||
# Step 4: Rename the new enum type to the original one | ||
op.execute("ALTER TYPE token_scopes_tmp RENAME TO token_scopes") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.