Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

data-classification数据分类

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

523

周安装

22

GitHub Stars

6

下载量

183
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:data-classification(数据分类)
来源仓库:https://github.com/hack23/homepage
仓库路径:skills/data-classification
安装命令:
npx skills add https://github.com/hack23/homepage --skill data-classification
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hack23/homepage --skill data-classification

简介

数据分类技能辅助表格处理与指标计算,支持 CSV/Excel 分析与异常检测。

  • 适用于数据清洗、汇总统计与图表准备等需要精确口径的场景。
  • 使用时需确认数据来源与时间范围,避免将样本当作全量事实使用。
  • 涉及敏感数据时应先脱敏,确保导出与批量写回操作符合权限边界。
  • 安装前建议验证工具行为,防止意外修改文件或访问受限资源。

SKILL.md

Data Classification Skill

Purpose

This skill implements data classification requirements as defined in the Hack23 ISMS Data Classification Policy. It ensures that all data is properly classified and handled according to its sensitivity level.

Rules

Classification Levels

Hack23 uses four classification levels:

  1. PUBLIC - Information intended for public disclosure
  2. INTERNAL - Information for internal use only
  3. CONFIDENTIAL - Sensitive information requiring protection
  4. RESTRICTED - Highly sensitive information requiring maximum protection

PUBLIC Data

Definition: Information that can be freely disclosed to the public without harm to Hack23, customers, or partners.

Examples:

  • Published website content
  • Marketing materials
  • Press releases
  • Open-source code in public repositories
  • Public ISMS policies
  • Public API documentation
  • Blog posts
  • Product brochures

MUST:

  • Mark as "PUBLIC" in metadata/headers
  • Allow unrestricted access
  • Can be stored on public cloud services
  • Can be transmitted unencrypted (though HTTPS is still recommended)
  • Apply standard backup procedures
  • Review before publication to ensure no unintended disclosure

MUST NOT:

  • Include any Internal, Confidential, or Restricted information
  • Include information that could aid attackers (detailed security configurations, vulnerability details)

INTERNAL Data

Definition: Information for use within Hack23 that should not be publicly disclosed but is not highly sensitive.

Examples:

  • Internal documentation
  • Meeting notes
  • Project plans
  • Employee directories
  • Internal policies
  • Development roadmaps
  • Non-confidential customer communications
  • Internal training materials

MUST:

  • Mark as "INTERNAL" in metadata/headers
  • Require authentication to access
  • Store on approved internal systems or cloud services with access controls
  • Transmit over encrypted channels (TLS 1.2+)
  • Include in regular backup procedures
  • Remove access when employees leave
  • Apply retention policies

MUST NOT:

  • Share with external parties without approval
  • Store on personal devices without encryption
  • Transmit over unencrypted channels
  • Post on public websites or forums

CONFIDENTIAL Data

Definition: Sensitive information that could cause significant harm if disclosed.

Examples:

  • Customer personal data (PII)
  • Financial records
  • Contracts and agreements
  • Strategic plans
  • Security assessment reports
  • Non-public vulnerability information
  • Source code for proprietary systems
  • Audit reports
  • Legal documents
  • HR records (non-sensitive)

MUST:

  • Mark as "CONFIDENTIAL" in metadata/headers
  • Require strong authentication (MFA recommended)
  • Implement role-based access control
  • Encrypt at rest (AES-256)
  • Encrypt in transit (TLS 1.2+)
  • Log all access
  • Store only on approved systems with encryption
  • Apply strict retention and disposal policies
  • Require NDA before sharing with external parties
  • Conduct access reviews quarterly
  • Remove access immediately when no longer needed

MUST NOT:

  • Share via unsecured channels (email without encryption, chat without E2E encryption)
  • Store on personal devices without full disk encryption and MDM
  • Include in logs or error messages
  • Share on public cloud services without encryption
  • Copy to removable media without encryption and approval

RESTRICTED Data

Definition: Highly sensitive information that could cause severe harm if disclosed.

Examples:

  • Passwords, encryption keys, API secrets
  • Authentication credentials
  • Personal health information (PHI)
  • Financial account credentials
  • Credit card data (PAN, CVV)
  • National ID numbers (SSN, passport numbers)
  • Biometric data
  • Cryptographic private keys
  • Security vulnerability details (before patching)

MUST:

  • Mark as "RESTRICTED" in metadata/headers
  • Require MFA for all access
  • Implement strict role-based access control with separation of duties
  • Encrypt at rest with AES-256
  • Encrypt in transit with TLS 1.2+
  • Log and monitor all access with alerts
  • Store in dedicated secure systems (key management systems for secrets)
  • Apply immediate retention (delete when no longer needed)
  • Require explicit approval for each access
  • Conduct access reviews monthly
  • Use secret management systems (never hardcode)
  • Implement automated rotation where possible
  • Revoke access immediately when no longer needed

MUST NOT:

  • Store in plaintext
  • Include in source code, configuration files, or version control
  • Include in logs, error messages, or debug output
  • Transmit via email, chat, or unsecured channels
  • Store on personal devices
  • Copy to removable media
  • Share screenshots or copies
  • Display on screen in public areas
  • Print unless absolutely necessary (and securely destroy after use)

Data Handling Matrix

RequirementPUBLICINTERNALCONFIDENTIALRESTRICTED
AuthenticationNot requiredRequiredRequiredMFA required
Access ControlOpenRBACStrict RBACStrict RBAC + approval
Encryption at RestOptionalRecommendedRequired (AES-256)Required (AES-256)
Encryption in TransitRecommendedRequired (TLS 1.2+)Required (TLS 1.2+)Required (TLS 1.2+)
Access LoggingOptionalRecommendedRequiredRequired + monitoring
Access ReviewN/AAnnuallyQuarterlyMonthly
BackupStandardStandardEncrypted backupEncrypted backup
RetentionAs neededPer policyStrict policyImmediate deletion
External SharingAllowedWith approvalNDA requiredProhibited

Classification Guidelines

MUST:

  • Classify all data at creation
  • Apply the highest classification if multiple types are present
  • Document classification decisions
  • Review classification periodically (annually minimum)
  • Train employees on classification
  • Mark documents/files with classification labels
  • Handle data according to its classification throughout its lifecycle

MUST NOT:

  • Downgrade classification without approval
  • Mix classifications in single document/database
  • Ignore classification in automated systems

Storage Requirements

PUBLIC:

  • Any approved storage

INTERNAL:

  • Approved internal file shares
  • Cloud storage with authentication
  • Internal databases

CONFIDENTIAL:

  • Encrypted cloud storage (approved providers)
  • Encrypted databases
  • Encrypted file systems
  • Encrypted backups

RESTRICTED:

  • Dedicated secure storage systems
  • Key management systems (for secrets)
  • HSM (for cryptographic keys)
  • Encrypted backups in secure locations

Transmission Requirements

PUBLIC:

  • Any method (HTTPS recommended)

INTERNAL:

  • TLS 1.2+ for network transmission
  • Authenticated email
  • VPN for remote access

CONFIDENTIAL:

  • TLS 1.2+ mandatory
  • Encrypted email (S/MIME or PGP)
  • Secure file transfer (SFTP, HTTPS)
  • VPN for remote access

RESTRICTED:

  • TLS 1.2+ mandatory
  • End-to-end encrypted channels
  • Out-of-band key exchange
  • Never via standard email

Disposal Requirements

PUBLIC:

  • Standard deletion

INTERNAL:

  • Secure deletion (overwrite)
  • Shred physical documents

CONFIDENTIAL:

  • Secure deletion with verification
  • Multiple overwrites
  • Cross-cut shred physical documents
  • Degauss magnetic media

RESTRICTED:

  • Cryptographic erasure
  • Physical destruction of media
  • Certificate of destruction
  • Immediate deletion from all locations

Examples

Example 1: Data Classification Headers (HTML)

<!-- PUBLIC data -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta name="classification" content="PUBLIC">
  <title>Hack23 - Cybersecurity Consulting</title>
</head>

<!-- INTERNAL data -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta name="classification" content="INTERNAL">
  <meta name="robots" content="noindex, nofollow">
  <title>Internal Project Documentation</title>
</head>

Example 2: Database Field Classification

// Define classification metadata
const userSchema = new mongoose.Schema({
  // PUBLIC
  username: {
    type: String,
    classification: 'PUBLIC',
    required: true
  },

  // INTERNAL
  email: {
    type: String,
    classification: 'INTERNAL',
    required: true
  },

  // CONFIDENTIAL
  firstName: {
    type: String,
    classification: 'CONFIDENTIAL',
    required: true
  },
  lastName: {
    type: String,
    classification: 'CONFIDENTIAL',
    required: true
  },
  dateOfBirth: {
    type: Date,
    classification: 'CONFIDENTIAL'
  },

  // RESTRICTED
  passwordHash: {
    type: String,
    classification: 'RESTRICTED',
    required: true,
    select: false // Never return in queries by default
  },
  ssn: {
    type: String,
    classification: 'RESTRICTED',
    select: false,
    // Encrypt at application level before storage
    get: (value) => decrypt(value),
    set: (value) => encrypt(value)
  }
});

Example 3: Logging with Classification

const winston = require('winston');

// Create logger with classification filter
const logger = winston.createLogger({
  format: winston.format.combine(
    winston.format.timestamp(),
    winston.format.json()
  ),
  transports: [
    new winston.transports.File({ filename: 'application.log' })
  ]
});

// Safe logging helper
function logSafely(level, message, metadata = {}) {
  // Filter out sensitive data
  const safeMetadata = {};

  for (const [key, value] of Object.entries(metadata)) {
    const classification = value?.classification || 'INTERNAL';

    // NEVER log RESTRICTED data
    if (classification === 'RESTRICTED') {
      safeMetadata[key] = '[RESTRICTED - REDACTED]';
    }
    // Mask CONFIDENTIAL data
    else if (classification === 'CONFIDENTIAL') {
      safeMetadata[key] = maskConfidential(value);
    }
    // INTERNAL and PUBLIC can be logged
    else {
      safeMetadata[key] = value;
    }
  }

  logger.log(level, message, safeMetadata);
}

function maskConfidential(value) {
  if (typeof value === 'string' && value.length > 4) {
    return value.substring(0, 2) + '***' + value.substring(value.length - 2);
  }
  return '***';
}

// Usage
logSafely('info', 'User login', {
  username: { value: 'john_doe', classification: 'PUBLIC' },
  email: { value: 'john@example.com', classification: 'INTERNAL' },
  ipAddress: { value: '192.168.1.1', classification: 'INTERNAL' },
  password: { value: 'secretpassword', classification: 'RESTRICTED' } // Will be redacted
});

// Output: { username: 'john_doe', email: 'john@example.com', ipAddress: '192.168.1.1', password: '[RESTRICTED - REDACTED]' }

Example 4: API Response Classification

// Filter API responses based on user permissions and classification
function filterResponseByClassification(data, userRole) {
  // Define role clearance levels
  const clearanceLevels = {
    'public': ['PUBLIC'],
    'user': ['PUBLIC', 'INTERNAL'],
    'admin': ['PUBLIC', 'INTERNAL', 'CONFIDENTIAL']
    // RESTRICTED data is never included in API responses
  };

  const allowedClassifications = clearanceLevels[userRole] || ['PUBLIC'];

  const filtered = {};
  for (const [key, value] of Object.entries(data)) {
    const classification = value?.classification || 'INTERNAL';

    if (classification === 'RESTRICTED') {
      // Never include RESTRICTED data in API responses
      continue;
    }

    if (allowedClassifications.includes(classification)) {
      filtered[key] = value.data || value;
    }
  }

  return filtered;
}

// Usage
app.get('/api/user/:id', requireAuth, async (req, res) => {
  const user = await db.users.findById(req.params.id);

  const userData = {
    username: { data: user.username, classification: 'PUBLIC' },
    email: { data: user.email, classification: 'INTERNAL' },
    firstName: { data: user.firstName, classification: 'CONFIDENTIAL' },
    lastName: { data: user.lastName, classification: 'CONFIDENTIAL' },
    ssn: { data: user.ssn, classification: 'RESTRICTED' } // Will never be included
  };

  const filtered = filterResponseByClassification(userData, req.user.role);
  res.json(filtered);
});

Example 5: File Classification Metadata

const fs = require('fs');
const xattr = require('fs-xattr');

// Set classification on file using extended attributes
async function setFileClassification(filePath, classification) {
  const validClassifications = ['PUBLIC', 'INTERNAL', 'CONFIDENTIAL', 'RESTRICTED'];

  if (!validClassifications.includes(classification)) {
    throw new Error(`Invalid classification: ${classification}`);
  }

  // Set extended attribute
  await xattr.set(filePath, 'user.classification', classification);

  // Set appropriate file permissions
  const permissions = {
    'PUBLIC': 0o644,      // rw-r--r--
    'INTERNAL': 0o640,    // rw-r-----
    'CONFIDENTIAL': 0o600, // rw-------
    'RESTRICTED': 0o600   // rw-------
  };

  await fs.promises.chmod(filePath, permissions[classification]);
}

// Get file classification
async function getFileClassification(filePath) {
  try {
    return await xattr.get(filePath, 'user.classification');
  } catch (err) {
    return 'INTERNAL'; // Default classification
  }
}

// Verify file handling based on classification
async function verifyFileHandling(filePath) {
  const classification = await getFileClassification(filePath);

  switch (classification) {
    case 'RESTRICTED':
    case 'CONFIDENTIAL':
      // Verify encryption
      const encrypted = await isFileEncrypted(filePath);
      if (!encrypted) {
        throw new Error(`${classification} file must be encrypted: ${filePath}`);
      }
      break;

    case 'INTERNAL':
      // Verify access controls
      const stats = await fs.promises.stat(filePath);
      if (stats.mode & 0o004) { // World readable
        throw new Error(`INTERNAL file must not be world-readable: ${filePath}`);
      }
      break;
  }
}

Example 6: Secure Deletion by Classification

const crypto = require('crypto');
const fs = require('fs').promises;

async function secureDelete(filePath, classification) {
  const stats = await fs.stat(filePath);
  const fileSize = stats.size;

  switch (classification) {
    case 'PUBLIC':
    case 'INTERNAL':
      // Simple deletion
      await fs.unlink(filePath);
      break;

    case 'CONFIDENTIAL':
      // Overwrite with random data 3 times
      for (let i = 0; i < 3; i++) {
        const randomData = crypto.randomBytes(fileSize);
        await fs.writeFile(filePath, randomData);
      }
      // Then delete
      await fs.unlink(filePath);
      break;

    case 'RESTRICTED':
      // Overwrite with random data 7 times (DoD 5220.22-M standard)
      for (let i = 0; i < 7; i++) {
        const randomData = crypto.randomBytes(fileSize);
        await fs.writeFile(filePath, randomData);
        // Sync to ensure write to disk
        const fd = await fs.open(filePath, 'r+');
        await fd.sync();
        await fd.close();
      }
      // Final overwrite with zeros
      await fs.writeFile(filePath, Buffer.alloc(fileSize, 0));
      // Then delete
      await fs.unlink(filePath);
      break;
  }

  // Log secure deletion
  logger.info('Secure deletion completed', {
    file: filePath,
    classification: classification,
    timestamp: new Date().toISOString()
  });
}

Related ISMS Policies

Related Documentation

Compliance Mapping

ISO 27001:2022

  • A.5.12 Classification of information
  • A.5.13 Labelling of information
  • A.5.14 Information transfer
  • A.8.10 Information deletion

GDPR

  • Article 32 - Security of processing (based on sensitivity)
  • Article 17 - Right to erasure

NIST Cybersecurity Framework

  • PR.DS-5: Protections against data leaks are implemented
  • PR.IP-2: A System Development Life Cycle manages systems based on data sensitivity

Enforcement

All data MUST be classified. Violations:

  • Unclassified data: Default to INTERNAL until properly classified
  • Misclassification: Review and correct immediately
  • Improper handling: Incident response, remediation required
  • Unauthorized disclosure: Security incident, potential breach notification

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.33%
按下载量换算66

Claude

27.67%
按下载量换算51

Cursor

18.97%
按下载量换算35

Gemini CLI

9.15%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills