linux-production-shell-scripts
构建 Linux 生产环境 Shell 脚本
Linux 团队需要可重复使用的脚本来处理常见管理工作。此技能为备份、监控、日志、用户、网络和自动化提供结构化的 Bash 模板。
请勿自动安装此 Skill。
权威策略要求在执行任何安装操作前由操作人员审查。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "linux-production-shell-scripts" from https://skillstore.io/skills/sickn33-linux-production-shell-scripts.md and its manifest at https://skillstore.io/api/skills/sickn33-linux-production-shell-scripts/manifest. Verify the artifact. Do not auto-install. Inspect the skill and report your findings, then wait for an operator or manual installation decision.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“linux-production-shell-scripts”。 为 /srv/app 创建一个保留七个归档文件的备份脚本。
预期结果:
一份 Bash 备份方案,包含可配置的源路径和目标路径、带时间戳的归档名称、保留逻辑,以及用于测试恢复行为的说明。
正在使用“linux-production-shell-scripts”。 检查 Apache 是否正在运行,并在需要时重启它。
预期结果:
一个服务维护脚本大纲,用于检查服务状态、记录每个操作、仅在需要时使用特权命令,并清晰报告失败。
正在使用“linux-production-shell-scripts”。 汇总 Linux 系统日志中的错误。
预期结果:
一种日志分析方法,用于选择日志文件、过滤重要错误词、统计匹配次数,并写入带日期的报告供审查。
安全审计
严重The skill is primarily documentation with Bash templates, so many Markdown backtick and shebang findings are false positives. Real risks remain in privileged package and service commands, cron and nohup persistence patterns, account inventory, destructive file operations, remote SSH execution, and unsafe secret handling examples.
已确认安全问题 (10)
显示全部 10 条已确认问题
能力复核项 (30)
这些是真实的本地能力,对此技能可能是预期行为,因此需要复核,但不会按已确认恶意行为计分。
风险因素
⚙️ 外部命令 (50)
🌐 网络访问 (2)
检测到的模式
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/sickn33-linux-production-shell-scripts/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/sickn33-linux-production-shell-scripts?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/sickn33-linux-production-shell-scripts?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/sickn33-linux-production-shell-scripts/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/sickn33-linux-production-shell-scripts.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
sickn33. (2026). linux-production-shell-scripts security audit report (audit version 5) [Author version 1.1]. Skillstore. https://skillstore.io/skills/sickn33-linux-production-shell-scripts/audits/5BibTeX 引用
@techreport{sickn33-sickn33-linux-production-shell-scripts-2026,
author = {sickn33},
title = {linux-production-shell-scripts security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/sickn33-linux-production-shell-scripts/audits/5},
note = {Author version 1.1}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "linux-production-shell-scripts security audit report (audit version 5)"
version: "1.1"
type: report
authors:
- name: "sickn33"
date-released: "2026-07-09"
url: "https://skillstore.io/skills/sickn33-linux-production-shell-scripts/audits/5"
identifiers:
- type: other
value: "skillstore:sickn33-linux-production-shell-scripts:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 中你能构建什么
创建备份任务
生成用于本地归档、远程 rsync 备份、数据库转储和简单备份轮转的脚本。
监控服务器健康状况
构建脚本来记录 CPU、磁盘、正常运行时间、进程、内存和服务状态,以便进行例行检查。
自动化维护任务
准备可重复使用的脚本,用于清理、包安装、cron 调度和仓库更新。
试试这些提示
创建一个 Bash 脚本,将一个目录备份到另一个目录,并生成带时间戳的归档文件。包含清晰的变量和基本错误处理。
创建一个 Linux 监控脚本,根据阈值检查 CPU 和磁盘使用率,并写入带时间戳的告警日志。
审查此 shell 脚本的引用、权限、破坏性命令、日志记录和回滚问题。在生产使用前建议更安全的修改。
设计一组用于备份、日志分析、清理和服务检查的 Bash 脚本。包含 dry-run 模式、配置变量和运维保障措施。
最佳实践
- 先在非生产测试环境中运行生成的脚本。
- 在执行前,将占位符替换为明确的路径、用户、主机和阈值。
- 围绕破坏性操作添加 dry-run、日志记录、确认和备份步骤。
避免
- 在未先阅读每条命令的情况下,以 root 身份运行生成的脚本。
- 在脚本文件中嵌入真实密码、令牌或私有主机名。
- 在验证路径和权限之前,调度 cron 任务或执行远程命令。