Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 134e99bf9a | |||
| b639447a7c | |||
| 97ff48bbfb | |||
| 1c8cb20373 | |||
| 74c458e370 | |||
| a7d942f705 | |||
| f867897348 |
+1482
-1349
File diff suppressed because one or more lines are too long
@@ -1,52 +0,0 @@
|
||||
# .gitleaks.toml - gitleaks 白名单配置
|
||||
# 仓库: xiaoxia/xiaoxia-saas
|
||||
# 用途: 排除已知的测试密钥、示例配置等误报
|
||||
|
||||
# 允许路径/文件排除
|
||||
[allowlist]
|
||||
description = "全局白名单 - 排除示例配置和测试文件"
|
||||
paths = [
|
||||
# 环境配置示例(无真实密钥)
|
||||
'.env.example',
|
||||
'.env.sample',
|
||||
'*.env.example',
|
||||
'*.env.sample',
|
||||
# 测试文件
|
||||
'tests/',
|
||||
'test/',
|
||||
'*/tests/',
|
||||
'*/test/',
|
||||
# 文档
|
||||
'docs/',
|
||||
'*.md',
|
||||
'*.rst',
|
||||
# 前端依赖
|
||||
'node_modules/',
|
||||
# Python包
|
||||
'site-packages/',
|
||||
# 锁定文件(自动生成)
|
||||
'poetry.lock',
|
||||
'Pipfile.lock',
|
||||
'requirements*.txt.lock',
|
||||
# CI配置本身
|
||||
'.gitea/',
|
||||
# Docker相关
|
||||
'docker-compose*.yml',
|
||||
# gitleaks配置自身
|
||||
'.gitleaks.toml',
|
||||
]
|
||||
|
||||
# 允许的密钥值/占位符正则
|
||||
regexes = [
|
||||
# 占位符模式
|
||||
'''(?i)(your[_-]?password|your[_-]?secret|your[_-]?key|your[_-]?token|changeme|change[_-]?me|placeholder|example[_-]?key|test[_-]?key|dummy|fake|mock|xxx|none|not[_-]?set|TODO|FIXME)''',
|
||||
# 数据库连接字符串中的通用密码(PostgreSQL示例配置)
|
||||
'''postgresql://[^:]+:changeme@''',
|
||||
'''postgresql://[^:]+:your-password@''',
|
||||
'''postgresql://[^:]+:password@localhost''',
|
||||
# Redis示例配置
|
||||
'''redis://:changeme@''',
|
||||
'''redis://:your-redis-password@''',
|
||||
# JWT示例密钥
|
||||
'''(?i)jwt[_-]?secret\s*[:=]\s*["']?(your[_-]?jwt|change|placeholder|secret|example)''',
|
||||
]
|
||||
Executable → Regular
-1
@@ -45,7 +45,6 @@ from packages.application.template.use_cases import (
|
||||
CreateTemplateUseCase,
|
||||
DeleteCategoryUseCase,
|
||||
DeleteTemplateUseCase,
|
||||
GetTemplateUsageUseCase,
|
||||
GetTemplateUseCase,
|
||||
ListCategoriesUseCase,
|
||||
ListTagsUseCase,
|
||||
|
||||
Executable → Regular
+1
-2
@@ -28,7 +28,6 @@ from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from video_processing.chroma_key_engine import apply_chroma_key_if_needed
|
||||
from video_processing.color_grade_engine import ColorGradeConfig, ColorGradeEngine
|
||||
from video_processing.ffmpeg_utils import (
|
||||
DEFAULT_FPS,
|
||||
@@ -46,7 +45,7 @@ from video_processing.render_audio import RenderContext, merge_audio_video, mix_
|
||||
from video_processing.render_subtitles import generate_ass_subtitles
|
||||
from video_processing.reverse_engine import ReverseConfig, ReverseEngine
|
||||
from video_processing.speed_engine import SpeedConfig, SpeedEngine
|
||||
from video_processing.sticker_engine import StickerEngine, parse_stickers_from_config
|
||||
from video_processing.sticker_engine import StickerEngine
|
||||
from video_processing.subtitle_generator import generate_ass_from_timeline
|
||||
from video_processing.transition_engine import TransitionEngine
|
||||
from video_processing.trim_engine import TrimConfig, TrimEngine, extract_trim_from_clip_config
|
||||
|
||||
@@ -179,7 +179,7 @@ class AssetAnalyzer:
|
||||
self._video_info = info
|
||||
return info
|
||||
|
||||
def extract_frames(self, count: int = 10, max_frames: int = 30) -> list[np.ndarray]:
|
||||
def extract_frames(self, count: int = 10) -> list[np.ndarray]:
|
||||
"""
|
||||
从视频中均匀抽取帧
|
||||
|
||||
|
||||
Executable → Regular
-2
@@ -461,7 +461,6 @@ def _download_library_assets(
|
||||
asset_library_id: str = "",
|
||||
project_id: str = "",
|
||||
asset_ids: list[str] | None = None,
|
||||
video_extensions: tuple = (".mp4", ".mov", ".avi", ".mkv", ".webm"),
|
||||
strict: bool = True,
|
||||
task_id: str = "",
|
||||
gen_task=None,
|
||||
@@ -480,7 +479,6 @@ def _download_library_assets(
|
||||
asset_library_id: 素材库 ID(可选,与 project_id 二选一)
|
||||
project_id: 项目 ID(可选,与 asset_library_id 二选一)
|
||||
asset_ids: 指定素材 ID 列表,为空则下载全部 ready 视频素材
|
||||
video_extensions: 支持的视频扩展名(保留兼容,当前按 file_type 过滤)
|
||||
strict: 严格模式(默认 True)。
|
||||
True — 任何素材下载失败立即抛 RuntimeError;
|
||||
False — 跳过失败素材,返回成功列表(调用方可通过日志感知失败)。
|
||||
|
||||
Executable → Regular
+1
-1
@@ -13,7 +13,7 @@ uvicorn[standard]==0.32.0
|
||||
pydantic==2.9.0
|
||||
|
||||
# 认证核心
|
||||
pyjwt==2.9.0
|
||||
pyjwt==2.13.0
|
||||
bcrypt==4.2.0
|
||||
|
||||
# Redis
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# vulture.conf - 死代码检测配置
|
||||
# 仓库: xiaoxia/xiaoxia-saas
|
||||
# 用途: 检测未使用的函数、变量、导入、类、方法、属性
|
||||
|
||||
# 扫描目录(空格分隔)
|
||||
path = alembic apps packages scripts
|
||||
|
||||
# 排除路径(每个路径一行,相对于仓库根目录)
|
||||
exclude =
|
||||
tests
|
||||
test
|
||||
*/tests
|
||||
*/test
|
||||
site-packages
|
||||
node_modules
|
||||
migrations
|
||||
.gitea
|
||||
docs
|
||||
scripts/check_*.py
|
||||
scripts/init_*.py
|
||||
|
||||
# 最低置信度 (%)
|
||||
# 0 = 报告所有可能的未使用代码
|
||||
# 100 = 只报告确定未使用的代码
|
||||
# 推荐从 80% 开始,逐步调高
|
||||
min-confidence = 80
|
||||
|
||||
# 输出格式: string, json, yaml
|
||||
format = text
|
||||
|
||||
# 按置信度排序
|
||||
sort-by-size = False
|
||||
|
||||
# 显示置信度
|
||||
show-uncertain = True
|
||||
@@ -1,57 +0,0 @@
|
||||
# vulture_whitelist.py - vulture 白名单文件
|
||||
# 用途: 列出已知被框架/动态调用的代码,避免误报
|
||||
# 参考: https://vulture.readthedocs.io/en/stable/whitelists.html
|
||||
|
||||
# FastAPI / Starlette 框架自动调用
|
||||
# FastAPI route handlers (通过装饰器注册,vulture 可能无法识别)
|
||||
apps.*.main.*
|
||||
apps.*.api.*
|
||||
apps.*.routes.*
|
||||
apps.*.views.*
|
||||
|
||||
# SQLAlchemy ORM
|
||||
# Model 类和字段通过 ORM 框架自动使用
|
||||
apps.*.models.*
|
||||
apps.*.schemas.*
|
||||
packages.*.models.*
|
||||
|
||||
# Pydantic models
|
||||
# Pydantic 字段通过序列化/反序列化使用
|
||||
apps.*.schemas.*
|
||||
packages.*.schemas.*
|
||||
|
||||
# Alembic migrations
|
||||
# Migration 函数由 alembic 自动调用
|
||||
alembic.versions.*.upgrade
|
||||
alembic.versions.*.downgrade
|
||||
|
||||
# Celery tasks
|
||||
# Task 函数通过 celery worker 调用
|
||||
apps.*.tasks.*
|
||||
packages.*.tasks.*
|
||||
|
||||
# CLI scripts / entry points
|
||||
# 脚本通过命令行调用
|
||||
scripts.*
|
||||
|
||||
# 中间件
|
||||
apps.*.middleware.*
|
||||
packages.*.middleware.*
|
||||
|
||||
# 异常类
|
||||
apps.*.exceptions.*
|
||||
packages.*.exceptions.*
|
||||
|
||||
# 配置类
|
||||
apps.*.config.*
|
||||
packages.*.config.*
|
||||
|
||||
# 工具函数(可能被多处间接调用,先白名单,后续清理)
|
||||
apps.*.utils.*
|
||||
packages.*.utils.*
|
||||
apps.*.helpers.*
|
||||
packages.*.helpers.*
|
||||
|
||||
# Dependencies (FastAPI Depends)
|
||||
apps.*.dependencies.*
|
||||
packages.*.dependencies.*
|
||||
Reference in New Issue
Block a user