Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Table of Contents

SonarQube Quality Model은 세 가지 종류의 규칙을 제공합니다: 신뢰성 (버그/bug), 취약성 (보안/security) 및 유지보수성 (코드 냄새/code smell) 입니다. 그러다 다르게 구분하면 단지 두 가지 종류의 규칙으로도 나뉩니다: 보안 관련 규칙과 그 이외의 규칙입니다. 실제로 이 두 그룹의 규칙이 발견하는 잠재적인 오류에는 큰 차이가 없으나, 해당 규칙들이 어디에서 연유했는지와 해당 규칙들을 강제하는 표준의 입장의 관점에서 차이가 있습니다.

보안 관련 규칙들에서 기대할 수 있는 것

To be clear, the standard for most rules implemented in SonarQube language plugins is very strict: no false positives. For normal rules, you should be able to be confident that whatever is reported to you as an issue really is an issue.

But for security-related rules, the story is a little different. For instance, a lot of security guidelines talk about how "sensitive" data should be handled (e.g. not logged, not stored un-encrypted, &etc.). But since it's not really possible in a rule to tell which data is sensitive and which isn't, the choice becomes: maintain the no-false-positives standard and don't implement security-related rules, or implement security-related rules with a different standard.

That's why security-related rules cast a wider net than you may be used to seeing. The idea is that the rule will flag anything suspicious, and leave it to the human security auditor to cull the false positives and sent the real issues for remediation. Such rules are tagged with "security" and off by default.

보안 관련 규칙의 출철

대부분의 보안 관련 규칙들은 CWESANS Top 25 및 OWASP Top 10과 같은 기 업계 표준에 근거하여 작성되었습니다. 이 표준들과 관계있는 규칙들을 확인하고자 하는 경우, 태그 혹은 문자열로 해당 규칙들을 검색할 수 있습니다. 해당 규칙과 관계 있는 표준들의 목록은 규칙 상세 기술 항목 하단의 See 섹션에 표시됩니다.

CWE

CWE는 Common Weakness Enumeration의 약자입니다. CWE FAQ에 따르면;

Common Weakness Enumeration (CWE™)는 공통적인 소프트웨어 취약점들의 공식 리스트 혹은 딕셔너리입니다. 이 취약점들은 소프트웨어 아키텍처, 설계, 코드 혹은 구현 단계에서 발생할 수 있으며 외부에서 착취가능한(exploitable) 보안 취약점으로 이어집니다. CWE는 소프트웨어 보안 취약성을 기술하기 위한 공통의 목적을 달성하고, 이러한 취약점을 노리는 소프트웨어 보안 도구들의 표준적인 측정을 가능토록 하며, 취약성 식별과 완화 및 예방 노력의 표준화 척도를 제공하기 위해 만들어졌습니다.

CWE는 취약점을 계층별로 기술합니다. 계층의 가장 닞은 레벨을 "Weakness Base"로 기술하며, 이는 가장 원초적인 단계의 취약점을 의미합니다. Weakness Bases 위로 Weakness Classes 및 Weakness Categories가 존재합니다. 일반적으로 코딩 규칙들은 Weakness Bases 혹은 Classes들과 연결됩니다.

CWE의 특정 조건을 만족하는 도구들은 "CWE 호환(CWE Compatible)"이라고 불립니다. 요구 조건은 아래와 같습니다:

  • CWE 식별자(CWE ID)를 사용해 CWE 관련 규칙을 검색할 수 있어야 합니다. SonarQube 플랫폼의 경우, 코딩 규칙 페이지에서 검색창에 CWE 식별자(예: CWE-595)를 입력하고 검색을 실행하면 해당 규칙을 검색할 수 있습니다.
  • 코딩 규칙들은 관련된 CWE 아이템에 정확하게 링크로 연결되어 있어야합니다. SonarQube 의 규칙과 CWE 규칙의 매핑을 확인하려면, 코딩 규칙 설명 하단의 See 섹션을 참조합니다.
  • You must be able to identify the relevant CWE from an Issue. To do so in the SonarQube platform, consult the related rule.
  • The product documentation must include a description of CWE and CWE Compatibility.
  • The version of CWE supported must be listed. The SonarQube langauge plugins support version 2.8.

In addition to searching rules by CWE id's, you can also search by the "cwe" rule tag.

To see which CWE items are covered for a language, consult the links below.

 

SANS Top 25

The SANS Top 25 list is a collection of the 25-most dangerous errors listed in the CWE, as compiled by the SANS organization. The current SANS list is divided into three categories: Insecure Interaction Between Components, Risky Resource Management, and Porous Defenses.

The tags used for SANS correspond to its categories: sans-top25-insecure, sans-top25-risky, sans-top25-porous.

To find rules relating to SANS Top 25, you can perform a text search for the category, or the relevant CWE item, or perform a rule tag search.

OWASP Top 10

OWASP stands for Open Web Application Security Project. According to its site, it is:

501(c)(3) worldwide not-for-profit charitable organization focused on improving the security of software. Our mission is to make software security visible, so that individuals and organizations worldwide can make informed decisions about true software security risks.

The OWASP Top 10 is a list of broad categories of weaknesses, each of which can map to many individual rules.

The tags used for OWASP correspond to the weakness categories: owasp-a1, owasp-a2, owasp-a3, owasp-a4, owasp-a5, owasp-a6, owasp-a7, owasp-a8, owasp-a9, owasp-a10.

To find rules relating to OWASP Top 10, you can perform a text search for the category, or perform a rule tag search.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.