├── .github
├── dependabot.yaml
├── issue_template
│ ├── guide.md
│ └── request.md
├── pull_request_template.md
└── workflows
│ ├── ci.yaml
│ └── housekeeping.yaml
├── .gitignore
├── .lycheeignore
├── 404.html
├── Gemfile
├── README.md
├── _config.yml
├── _data
├── draft-en.yaml
├── stable-en.yaml
└── stable-es.yaml
├── _includes
├── banner.html
├── breadcrumb.html
└── navigation.html
├── assets
├── docs
│ ├── OWASP_SCP_Quick_Reference_Guide_v21.doc
│ └── OWASP_SCP_Quick_Reference_Guide_v21.pdf
└── images
│ └── by-sa.svg
├── code_of_conduct.md
├── contributing.md
├── draft-en
├── 01-introduction
│ ├── 05-introduction.md
│ └── info.md
├── 02-checklist
│ ├── 05-checklist.md
│ ├── index.md
│ └── info.md
├── 03-appendices
│ ├── 03-overview.md
│ ├── 05-glossary.md
│ ├── 07-references.md
│ ├── index.md
│ └── info.md
├── index.md
├── info.md
├── title.pdf.yaml
└── title.yaml
├── index.md
├── info.md
├── leaders.md
├── license.txt
├── security.md
├── stable-en
├── 01-introduction
│ ├── 05-introduction.md
│ └── info.md
├── 02-checklist
│ ├── 05-checklist.md
│ ├── index.md
│ └── info.md
├── 03-appendices
│ ├── 03-overview.md
│ ├── 05-glossary.md
│ ├── 07-references.md
│ ├── index.md
│ └── info.md
├── index.md
├── info.md
├── title.pdf.yaml
└── title.yaml
├── stable-es
├── 01-introduction
│ ├── 05-introduction.md
│ └── info.md
├── 02-checklist
│ ├── 05-checklist.md
│ ├── index.md
│ └── info.md
├── 03-appendices
│ ├── 03-overview.md
│ ├── 05-glossary.md
│ ├── 07-references.md
│ ├── index.md
│ └── info.md
├── index.md
├── info.md
├── title.pdf.yaml
└── title.yaml
├── stable-fa
├── 01-introduction
│ ├── 05-introduction.md
│ └── info.md
├── 02-checklist
│ ├── 05-checklist.md
│ ├── index.md
│ └── info.md
├── 03-appendices
│ ├── 03-overview.md
│ ├── 05-glossary.md
│ ├── 07-references.md
│ ├── index.md
│ └── info.md
├── index.md
├── info.md
├── title.pdf.yaml
└── title.yaml
├── tab_archive.md
├── tab_contributors.md
└── tab_download.md
/.github/dependabot.yaml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: ".github/workflows"
5 | schedule:
6 | interval: "monthly"
7 | # Disable version updates
8 | open-pull-requests-limit: 0
9 | ignore:
10 | # ignore all (non-security) patch updates
11 | - dependency-name: "*"
12 | update-types: ["version-update:semver-patch"]
13 |
--------------------------------------------------------------------------------
/.github/issue_template/guide.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Change request
3 | about: Contribute to the SCP guide
4 | title: 'Change the guide'
5 | labels: 'documentation'
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Suggest a contribution to the guide**
11 |
12 |
13 | **Section / language**
14 |
15 |
--------------------------------------------------------------------------------
/.github/issue_template/request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Change request
3 | about: Suggest a change to the project pages
4 | title: 'Change the project pages'
5 | labels: 'pages'
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe what change you would like**
11 |
12 |
13 | **Context**
14 |
15 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | **Summary**:
2 | Provide a summary for the reviewers of this pull request, stating the language and section will help as well.
3 | Please provide enough information so that others can review your pull request
4 |
5 | **Description for the changelog**:
6 | A short (one line) summary that describes the changes in this pull request for inclusion in the change log
7 |
8 | **Other info**:
9 | Thanks for submitting a pull request! Please make sure you follow our code_of_conduct.md
10 |
11 | If this closes an existing issue then add "closes #xxxx", where xxxx is the issue number
12 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yaml:
--------------------------------------------------------------------------------
1 | name: CI pipeline
2 | on:
3 | push:
4 | branches:
5 | - main
6 | pull_request:
7 | branches:
8 | - main
9 | workflow_dispatch:
10 |
11 | # for security reasons the github actions are pinned to specific release versions
12 | jobs:
13 | link_checker:
14 | name: Link checker
15 | runs-on: ubuntu-22.04
16 | steps:
17 | - name: Checkout markdown
18 | uses: actions/checkout@v4.0.0
19 |
20 | - name: Link Checker
21 | uses: lycheeverse/lychee-action@v1.8.0
22 | with:
23 | # skip the archive file as it is full of broken links
24 | args: --verbose --no-progress --exclude-path './tab_archive.md' '**/*.md' '*.md'
25 | fail: true
26 | env:
27 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
28 |
29 | en_draft:
30 | name: Export epub and pdf (EN draft)
31 | runs-on: ubuntu-22.04
32 | needs: [link_checker]
33 | steps:
34 | - name: Checkout markdown
35 | uses: actions/checkout@v4.0.0
36 |
37 | - name: Combine markdown
38 | run: |
39 | tail --lines=+11 --quiet \
40 | draft-en/01-introduction/*.md \
41 | draft-en/02-checklist/*.md \
42 | draft-en/03-appendices/*.md > draft-en.markdown
43 | mkdir -p publish
44 |
45 | - name: Export to pdf
46 | uses: docker://pandoc/latex:3.1
47 | with:
48 | args: >-
49 | --output=publish/OWASP_SCP_Quick_Reference_Guide.draft.pdf
50 | draft-en/title.pdf.yaml
51 | draft-en.markdown
52 |
53 | - name: Export to epub
54 | uses: docker://pandoc/latex:3.1
55 | with:
56 | args: >-
57 | --output=publish/OWASP_SCP_Quick_Reference_Guide.draft.epub
58 | draft-en/title.yaml
59 | draft-en.markdown
60 |
61 | - name: Save pdfs and epubs
62 | uses: actions/upload-artifact@v3.1.2
63 | with:
64 | name: en-draft
65 | path: publish
66 |
67 | en_stable:
68 | name: Export epub and pdf (EN stable)
69 | runs-on: ubuntu-22.04
70 | needs: [link_checker]
71 | steps:
72 | - name: Checkout markdown
73 | uses: actions/checkout@v4.0.0
74 |
75 | - name: Combine markdown
76 | run: |
77 | tail --lines=+11 --quiet \
78 | stable-en/01-introduction/*.md \
79 | stable-en/02-checklist/*.md \
80 | stable-en/03-appendices/*.md > stable-en.markdown
81 | mkdir -p publish
82 |
83 | - name: Export to pdf
84 | uses: docker://pandoc/latex:3.1
85 | with:
86 | args: >-
87 | --output=publish/OWASP_SCP_Quick_Reference_Guide.en-US.pdf
88 | stable-en/title.pdf.yaml
89 | stable-en.markdown
90 |
91 | - name: Export to epub
92 | uses: docker://pandoc/latex:3.1
93 | with:
94 | args: >-
95 | --output=publish/OWASP_SCP_Quick_Reference_Guide.en-US.epub
96 | stable-en/title.yaml
97 | stable-en.markdown
98 |
99 | - name: Save pdfs and epubs
100 | uses: actions/upload-artifact@v3.1.2
101 | with:
102 | name: en-stable
103 | path: publish
104 |
105 | es_stable:
106 | name: Export epub and pdf (ES stable)
107 | runs-on: ubuntu-22.04
108 | needs: [link_checker]
109 | steps:
110 | - name: Checkout markdown
111 | uses: actions/checkout@v4.0.0
112 |
113 | - name: Combine markdown
114 | run: |
115 | tail --lines=+11 --quiet \
116 | stable-es/01-introduction/*.md \
117 | stable-es/02-checklist/*.md \
118 | stable-es/03-appendices/*.md > stable-es.markdown
119 | mkdir -p publish
120 |
121 | - name: Export to pdf
122 | uses: docker://pandoc/latex:3.1
123 | with:
124 | args: >-
125 | --output=publish/OWASP_SCP_Quick_Reference_Guide.es-UY.pdf
126 | stable-es/title.pdf.yaml
127 | stable-es.markdown
128 |
129 | - name: Export to epub
130 | uses: docker://pandoc/latex:3.1
131 | with:
132 | args: >-
133 | --output=publish/OWASP_SCP_Quick_Reference_Guide.es-UY.epub
134 | stable-es/title.yaml
135 | stable-es.markdown
136 |
137 | - name: Save pdfs and epubs
138 | uses: actions/upload-artifact@v3.1.2
139 | with:
140 | name: es-stable
141 | path: publish
--------------------------------------------------------------------------------
/.github/workflows/housekeeping.yaml:
--------------------------------------------------------------------------------
1 | name: Housekeeping
2 | on:
3 | # Run daily at 7:00
4 | schedule:
5 | - cron: '0 7 * * *'
6 | workflow_dispatch:
7 |
8 | # for security reasons the github actions are pinned to specific release versions
9 | jobs:
10 | chores:
11 | name: Tidy workflows
12 | runs-on: ubuntu-22.04
13 |
14 | steps:
15 | - name: Delete stale workflow runs
16 | uses: Mattraks/delete-workflow-runs@v2.0.4
17 | with:
18 | token: ${{ github.token }}
19 | repository: ${{ github.repository }}
20 | retain_days: 28
21 | keep_minimum_runs: 10
22 |
23 | - name: Delete unused workflows
24 | uses: otto-de/purge-deprecated-workflow-runs@v1.4.0
25 | with:
26 | token: ${{ github.token }}
27 |
28 | link_checker:
29 | name: Link checker
30 | runs-on: ubuntu-22.04
31 |
32 | steps:
33 | - name: Checkout markdown
34 | uses: actions/checkout@v4.0.0
35 |
36 | - name: Link Checker
37 | uses: lycheeverse/lychee-action@v1.8.0
38 | with:
39 | # skip the archive file as it is full of broken links
40 | args: --verbose --no-progress --exclude-path './tab_archive.md' '*.md' '**/*.md'
41 | fail: true
42 | env:
43 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
44 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # uses allow-list, so initially ignore everything
2 | *
3 |
4 | # allow github, workflows and templates
5 | !.github/
6 | !.github/workflows/
7 | !.github/workflows/*.yaml
8 | !.github/issue_template/
9 | !.github/issue_template/*.md
10 | !.gitignore
11 | !.lycheeignore
12 |
13 | # allow markdown and the assets
14 | !*.md
15 | !license.txt
16 | !assets/
17 | !assets/images/
18 | !assets/images/*.svg
19 | !assets/docs/
20 | !assets/docs/*.doc
21 | !assets/docs/*.pdf
22 |
23 | # allow the stable area
24 | !stable/
25 | !stable-en/
26 | !stable-en/title*.yaml
27 | !stable-en/.*.md
28 | !stable-en/01-introduction/
29 | !stable-en/01-introduction/*.md
30 | !stable-en/02-checklist/
31 | !stable-en/02-checklist/*.md
32 | !stable-en/03-appendices/
33 | !stable-en/03-appendices/*.md
34 | !stable-es/
35 | !stable-es/title*.yaml
36 | !stable-es/.*.md
37 | !stable-es/01-introduction/
38 | !stable-es/01-introduction/*.md
39 | !stable-es/02-checklist/
40 | !stable-es/02-checklist/*.md
41 | !stable-es/03-appendices/
42 | !stable-es/03-appendices/*.md
43 | !stable-fa/
44 | !stable-fa/title*.yaml
45 | !stable-fa/.*.md
46 | !stable-fa/01-introduction/
47 | !stable-fa/01-introduction/*.md
48 | !stable-fa/02-checklist/
49 | !stable-fa/02-checklist/*.md
50 | !stable-fa/03-appendices/
51 | !stable-fa/03-appendices/*.md
52 |
53 | # allow the draft area
54 | !draft-en/
55 | !draft-en/title*.yaml
56 | !draft-en/.*.md
57 | !draft-en/01-introduction/
58 | !draft-en/01-introduction/*.md
59 | !draft-en/02-checklist/
60 | !draft-en/02-checklist/*.md
61 | !draft-en/03-appendices/
62 | !draft-en/03-appendices/*.md
63 |
64 | # allow jekyll build files
65 | !404.html
66 | !Gemfile
67 | !_config.yml
68 | !_data/
69 | !_data/*.yaml
70 | !_includes/
71 | !_includes/*.html
72 |
73 |
--------------------------------------------------------------------------------
/.lycheeignore:
--------------------------------------------------------------------------------
1 | # ignore these falae positives from the link checker housekeeper
2 |
3 | # these are known broken links that we preserve in the archive
4 | www.owasp.org/images/6/64/SCP-QRG_Revisions_History.xls
5 | www.owasp.org/images/b/ba/Web_Application_Development_Dos_and_Donts.ppt
6 |
7 | # the jekyll scripts sometimes upset lychee:
8 | _includes/breadcrumb.html
9 | _includes/navigation.html
10 |
11 |
--------------------------------------------------------------------------------
/404.html:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | title: 404 - Not Found
4 | layout: col-generic
5 |
6 | ---
7 |
8 |
9 |
10 |
WHOA THAT PAGE CANNOT BE FOUND
11 |
Try the SEARCH function in the main navigation to find something. If you are looking for chapter information, please see Chapters for the correct chapter. For information about OWASP projects see Projects . For common attacks, vulnerabilities, or information about other community-led contributions see Contributed Content .
12 |
13 |
14 |
If all else fails you can search our historical site .
15 |
16 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | group :jekyll_plugins do
3 | gem "github-pages"
4 | end
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Cornucopia
2 |
3 | [Version 2.1][en21pdf] of the Secure Coding Practices quick reference guide
4 | provides the numbering system used in the [Cornucopia project][cornucopia] playing cards.
5 |
6 | ### Archived project
7 |
8 | The content of the Secure Coding Practices Quick-reference Guide overview and glossary has been migrated
9 | to various sections within the [OWASP Developer Guide][guide].
10 |
11 | The Secure Coding Practices Quick-reference Guide checklists have been migrated to the Developer Guide
12 | using issue [number #76](https://github.com/OWASP/www-project-developer-guide/issues/76)
13 | and pull request [number #77](https://github.com/OWASP/www-project-developer-guide/pull/77);
14 | this provides a wider audience for the original checklist.
15 |
16 | The OWASP Secure Coding Practices Quick-reference Guide [project][www-project] has now been archived.
17 |
18 | Contact [Jon Gadsden][jon] for any questions about this move.
19 |
20 | The [latest stable Spanish language version](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/stable-es/)
21 | is available on these OWASP project pages along with
22 | the [latest stable English language version](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/stable-en/).
23 |
24 | There is also a [work in progress English language version](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/draft-en/).
25 |
26 | #### Project leader
27 |
28 | * [Jon Gadsden][jon]
29 |
30 | [cornucopia]: https://owasp.org/www-project-cornucopia/
31 | [en21pdf]: assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.pdf
32 | [jon]: mailto:jon.gadsden@owasp.org
33 | [guide]: https://owasp.org/www-project-developer-guide/
34 | [www-project]: https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/
35 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | remote_theme: "owasp/www--site-theme@main"
2 | plugins:
3 | - jekyll-include-cache-0.2.0
--------------------------------------------------------------------------------
/_data/draft-en.yaml:
--------------------------------------------------------------------------------
1 | docs_list_title: Secure Coding Practice Quick-reference Guide (Draft)
2 | docs:
3 |
4 | - title: '1. Introduction'
5 | url: 01-introduction/05-introduction
6 |
7 | - title: '2. Checklist'
8 | url: 02-checklist/05-checklist
9 |
10 | - title: '2.1 Input validation'
11 | url: 02-checklist/05-checklist#input-validation
12 |
13 | - title: '2.2 Output encoding'
14 | url: 02-checklist/05-checklist#output-encoding
15 |
16 | - title: '2.3 Authentication and password management'
17 | url: 02-checklist/05-checklist#authentication-and-password-management
18 |
19 | - title: '2.4 Session management'
20 | url: 02-checklist/05-checklist#session-management
21 |
22 | - title: '2.5 Access control'
23 | url: 02-checklist/05-checklist#access-control
24 |
25 | - title: '2.6 Cryptographic practices'
26 | url: 02-checklist/05-checklist#cryptographic-practices
27 |
28 | - title: '2.7 Error handling and logging'
29 | url: 02-checklist/05-checklist#error-handling-and-logging
30 |
31 | - title: '2.8 Data protection'
32 | url: 02-checklist/05-checklist#data-protection
33 |
34 | - title: '2.9 Communication security'
35 | url: 02-checklist/05-checklist#communication-security
36 |
37 | - title: '2.10 System configuration'
38 | url: 02-checklist/05-checklist#system-configuration
39 |
40 | - title: '2.11 Database security'
41 | url: 02-checklist/05-checklist#database-security
42 |
43 | - title: '2.12 File management'
44 | url: 02-checklist/05-checklist#file-management
45 |
46 | - title: '2.13 Memory management'
47 | url: 02-checklist/05-checklist#memory-management
48 |
49 | - title: '2.14 General coding practices'
50 | url: 02-checklist/05-checklist#general-coding-practices
51 |
52 | - title: 'Appendix A. Overview'
53 | url: 03-appendices/03-overview
54 |
55 | - title: 'Appendix B. Glossary'
56 | url: 03-appendices/05-glossary
57 |
58 | - title: 'Appendix C. External references'
59 | url: 03-appendices/07-references
60 |
--------------------------------------------------------------------------------
/_data/stable-en.yaml:
--------------------------------------------------------------------------------
1 | docs_list_title: Secure Coding Practice Quick-reference Guide
2 | docs:
3 |
4 | - title: '1. Introduction'
5 | url: 01-introduction/05-introduction
6 |
7 | - title: '2. Checklist'
8 | url: 02-checklist/05-checklist
9 |
10 | - title: '2.1 Input validation'
11 | url: 02-checklist/05-checklist#input-validation
12 |
13 | - title: '2.2 Output encoding'
14 | url: 02-checklist/05-checklist#output-encoding
15 |
16 | - title: '2.3 Authentication and password management'
17 | url: 02-checklist/05-checklist#authentication-and-password-management
18 |
19 | - title: '2.4 Session management'
20 | url: 02-checklist/05-checklist#session-management
21 |
22 | - title: '2.5 Access control'
23 | url: 02-checklist/05-checklist#access-control
24 |
25 | - title: '2.6 Cryptographic practices'
26 | url: 02-checklist/05-checklist#cryptographic-practices
27 |
28 | - title: '2.7 Error handling and logging'
29 | url: 02-checklist/05-checklist#error-handling-and-logging
30 |
31 | - title: '2.8 Data protection'
32 | url: 02-checklist/05-checklist#data-protection
33 |
34 | - title: '2.9 Communication security'
35 | url: 02-checklist/05-checklist#communication-security
36 |
37 | - title: '2.10 System configuration'
38 | url: 02-checklist/05-checklist#system-configuration
39 |
40 | - title: '2.11 Database security'
41 | url: 02-checklist/05-checklist#database-security
42 |
43 | - title: '2.12 File management'
44 | url: 02-checklist/05-checklist#file-management
45 |
46 | - title: '2.13 Memory management'
47 | url: 02-checklist/05-checklist#memory-management
48 |
49 | - title: '2.14 General coding practices'
50 | url: 02-checklist/05-checklist#general-coding-practices
51 |
52 | - title: 'Appendix A. Overview'
53 | url: 03-appendices/03-overview
54 |
55 | - title: 'Appendix B. Glossary'
56 | url: 03-appendices/05-glossary
57 |
58 | - title: 'Appendix C. External references'
59 | url: 03-appendices/07-references
60 |
--------------------------------------------------------------------------------
/_data/stable-es.yaml:
--------------------------------------------------------------------------------
1 | docs_list_title: Prácticas de Codificación Segura - Guía rápida de referencia
2 | docs:
3 |
4 | - title: '1. Introducción'
5 | url: 01-introduction/05-introduction
6 |
7 | - title: '2. Lista de Verificación'
8 | url: 02-checklist/05-checklist
9 |
10 | - title: '2.1 Validación de entradas'
11 | url: 02-checklist/05-checklist#input-validation
12 |
13 | - title: '2.2 Codificación de salidas'
14 | url: 02-checklist/05-checklist#output-encoding
15 |
16 | - title: '2.3 Gestión de autenticación y contraseñas'
17 | url: 02-checklist/05-checklist#authentication-and-password-management
18 |
19 | - title: '2.4 Gestión de sesiones'
20 | url: 02-checklist/05-checklist#session-management
21 |
22 | - title: '2.5 Control de acceso'
23 | url: 02-checklist/05-checklist#access-control
24 |
25 | - title: '2.6 Prácticas critpográficas'
26 | url: 02-checklist/05-checklist#cryptographic-practices
27 |
28 | - title: '2.7 Gestión de errores y registros (logs)'
29 | url: 02-checklist/05-checklist#error-handling-and-logging
30 |
31 | - title: '2.8 Protección de datos'
32 | url: 02-checklist/05-checklist#data-protection
33 |
34 | - title: '2.9 Seguridad en las comunicaciones'
35 | url: 02-checklist/05-checklist#communication-security
36 |
37 | - title: '2.10 Configuración de los sistemas'
38 | url: 02-checklist/05-checklist#system-configuration
39 |
40 | - title: '2.11 Seguridad de Base de Datos'
41 | url: 02-checklist/05-checklist#database-security
42 |
43 | - title: '2.12 Gestión de Archivos'
44 | url: 02-checklist/05-checklist#file-management
45 |
46 | - title: '2.13 Gestión de Memoria'
47 | url: 02-checklist/05-checklist#memory-management
48 |
49 | - title: '2.14 Practicas Generales para la Codificación'
50 | url: 02-checklist/05-checklist#general-coding-practices
51 |
52 | - title: 'Apéndice A. Visión General'
53 | url: 03-appendices/03-overview
54 |
55 | - title: 'Apéndice B. Glosario'
56 | url: 03-appendices/05-glossary
57 |
58 | - title: 'Apéndice C. Referencias externas'
59 | url: 03-appendices/07-references
60 |
--------------------------------------------------------------------------------
/_includes/banner.html:
--------------------------------------------------------------------------------
1 |
2 | {% if page.url contains "/draft/" %}
3 |
4 | This content represents the latest contributions to the Secure Coding Practice Quick-reference Guide, and may frequently change
5 |
6 | {% endif %}
7 |
8 | {% if page.url contains "/stable/" or page.url contains site.stable_version %}
9 |
10 | You're viewing the current stable version of the Secure Coding Practice Quick-reference Guide project
11 |
12 | {% endif %}
13 |
14 |
--------------------------------------------------------------------------------
/_includes/breadcrumb.html:
--------------------------------------------------------------------------------
1 |
2 |
Home
3 | {%- capture page_url_without_index_html -%}{{ page.url | remove: "/index.html" }}{%- endcapture -%}
4 | {%- assign split_url_parts = page_url_without_index_html | split: '/' -%}
5 | {%- capture forLoopMaxInt -%}{{ split_url_parts.size | minus:1 }}{%- endcapture -%}
6 | {%- for i in (1..forLoopMaxInt) -%}
7 | {%- capture current_breadcrumb_url -%}{{next_prepender}}/{{ split_url_parts[i] }}/index.html{%- endcapture -%}
8 | {%- capture current_breadcrumb_md_url -%}{{next_prepender}}/{{ split_url_parts[i] }}/{%- endcapture -%}
9 | {%- capture next_prepender -%}{{next_prepender}}/{{ split_url_parts[i] }}{%- endcapture -%}
10 | {%- for breadcrumb_page in site.pages -%}
11 | {%- if current_breadcrumb_url == breadcrumb_page.url or current_breadcrumb_md_url == breadcrumb_page.url -%}
12 | {%- capture breadcrumb_page_page_url_without_index_html -%}{{ breadcrumb_page.url | remove: "index.html" }}{%- endcapture -%}
13 | >
14 | {%- if i == 1 -%}
15 | {{split_url_parts[i] | capitalize }}
16 | {%- else -%}
17 | {{split_url_parts[i] | replace: "_", " "}}
18 | {%- endif -%}
19 |
20 | {%- endif -%}
21 | {%- endfor -%}
22 | {%- endfor -%}
23 |
24 |
--------------------------------------------------------------------------------
/_includes/navigation.html:
--------------------------------------------------------------------------------
1 | {% assign nav = site.data[include.collection] %}
2 |
3 |
4 |
--------------------------------------------------------------------------------
/assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/www-project-secure-coding-practices-quick-reference-guide/a643255efc757550aad846e6ddf2d905220795ed/assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.doc
--------------------------------------------------------------------------------
/assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/www-project-secure-coding-practices-quick-reference-guide/a643255efc757550aad846e6ddf2d905220795ed/assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.pdf
--------------------------------------------------------------------------------
/assets/images/by-sa.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
21 |
43 |
45 |
46 |
48 | image/svg+xml
49 |
51 |
52 |
53 |
54 |
58 |
64 |
69 |
70 |
73 |
74 |
83 |
84 |
87 |
90 |
91 |
92 |
93 |
94 |
95 |
98 |
99 |
102 |
106 |
107 |
111 |
112 |
113 |
114 |
117 |
121 |
122 |
126 |
127 |
128 |
129 |
132 |
133 |
142 |
143 |
146 |
149 |
150 |
153 |
154 |
155 |
156 |
157 |
158 |
160 |
170 |
171 |
173 |
176 |
177 |
186 |
187 |
188 |
189 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
--------------------------------------------------------------------------------
/code_of_conduct.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, caste, color, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement by
63 | emailing [the project team](mailto:owasp.foundation@owasp.org) at the OWASP foundation.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available from the [contributor covenant][cofc] site.
119 |
120 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][diversity].
121 |
122 | See the [FAQ][faq] for answers to common questions about this code of conduct,
123 | and translations are available of this [contributor covenant][translate].
124 |
125 | [cofc]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
126 | [diversity]: https://github.com/mozilla/diversity
127 | [faq]: https://www.contributor-covenant.org/faq
128 | [homepage]: https://www.contributor-covenant.org
129 | [translate]: https://www.contributor-covenant.org/translations
130 |
--------------------------------------------------------------------------------
/contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing to OWASP Secure Coding Practices quick reference guide
2 | This is a community project, and we are always delighted to welcome new contributors!
3 |
4 | ## When contributing
5 | * see if there is [already an issue][issues] for what you want to do
6 | * follow our [Code of Conduct](code_of_conduct.md)
7 |
8 | ## Have a change request?
9 | If you have a suggestion then [raise an issue][new],
10 | and include as much information as you can so that we can fully understand your requirements.
11 |
12 | [issues]: https://github.com/OWASP/www-project-secure-coding-practices-quick-reference-guide/issues
13 | [new]: https://github.com/OWASP/www-project-secure-coding-practices-quick-reference-guide/issues/new/
14 |
15 |
--------------------------------------------------------------------------------
/draft-en/01-introduction/05-introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices - Draft
5 | tags: SCP-QRG
6 |
7 | ---
8 |
9 | {% include breadcrumb.html %}
10 | # Introduction
11 |
12 | This technology agnostic document defines a set of general software
13 | security coding practices, in a checklist format, that can be integrated
14 | into the software development lifecycle. Implementation of these
15 | practices will mitigate most common software vulnerabilities.
16 |
17 | Generally, it is much less expensive to build secure software than to
18 | correct security issues after the software package has been completed,
19 | not to mention the costs that may be associated with a security breach.
20 |
21 | Securing critical software resources is more important than ever as the
22 | focus of attackers has steadily moved toward the application layer. A
23 | 2009 SANS study found that attacks against web applications
24 | constitute more than 60% of the total attack attempts observed on the
25 | Internet.
26 |
27 | When utilizing this guide, development teams should start by assessing
28 | the maturity of their secure software development lifecycle and the
29 | knowledge level of their development staff. Since this guide does not
30 | cover the details of how to implement each coding practice, developers
31 | will either need to have the prior knowledge or have sufficient
32 | resources available that provide the necessary guidance. This guide
33 | provides coding practices that can be translated into coding
34 | requirements without the need for the developer to have an in depth
35 | understanding of security vulnerabilities and exploits. However, other
36 | members of the development team should have the responsibility, adequate
37 | training, tools and resources to validate that the design and
38 | implementation of the entire system is secure.
39 |
40 | A glossary of important terms in this document is provided in appendix B.
41 |
42 | Guidance on implementing a secure software development framework is
43 | beyond the scope of this paper, however the following additional general
44 | practices and resources are recommended:
45 |
46 | - Clearly define roles and responsibilities
47 |
48 | - Provide development teams with adequate software security training
49 |
50 | - Implement a secure software development lifecycle
51 |
52 | - Establish secure coding standards
53 |
54 | - [OWASP Development Guide][guide] Project
55 |
56 | - Build a re-usable object library
57 |
58 | - [OWASP Enterprise Security API][esapi] (ESAPI) Project
59 |
60 | - Verify the effectiveness of security controls
61 |
62 | - [OWASP Application Security Verification Standard][asvs] (ASVS) Project
63 |
64 | - Establish secure outsourced development practices including defining
65 | security requirements and verification methodologies in both the
66 | request for proposal (RFP) and contract.
67 |
68 |
69 | [asvs]: https://owasp.org/www-project-application-security-verification-standard/
70 | [esapi]: https://owasp.org/www-project-enterprise-security-api/
71 | [guide]: https://owasp.org/www-project-developer-guide/
72 |
73 | \newpage
74 |
--------------------------------------------------------------------------------
/draft-en/01-introduction/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="draft-en" %}
2 |
--------------------------------------------------------------------------------
/draft-en/02-checklist/05-checklist.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices - Draft
5 | tags: SCP-QRG
6 |
7 | ---
8 |
9 | {% include breadcrumb.html %}
10 | # Secure Coding Practices Checklist
11 |
12 | ## Input validation
13 |
14 | - [ ] Conduct all input validation on a trusted system (server side not client side)
15 |
16 | - [ ] Identify all data sources and classify them into trusted and untrusted
17 |
18 | - [ ] Validate all data from untrusted sources (databases, file streams, etc)
19 |
20 | - [ ] Use a centralized input validation routine for the whole application
21 |
22 | - [ ] Specify character sets, such as UTF-8, for all input sources
23 |
24 | - [ ] Encode input to a common character set before validating
25 |
26 | - [ ] All validation failures should result in input rejection
27 |
28 | - [ ] If the system supports UTF-8 extended character sets and validate after UTF-8 decoding is completed
29 |
30 | - [ ] Validate all client provided data before processing
31 |
32 | - [ ] Verify that protocol header values in both requests and responses contain only ASCII characters
33 |
34 | - [ ] Validate data from redirects
35 |
36 | - [ ] Validate for expected data types using an \"allow\" list rather than a \"deny\" list
37 |
38 | - [ ] Validate data range
39 |
40 | - [ ] Validate data length
41 |
42 | - [ ] If any potentially hazardous input must be allowed then implement additional controls
43 |
44 | - [ ] If the standard validation routine cannot address some inputs then use extra discrete checks
45 |
46 | - [ ] Utilize canonicalization to address obfuscation attacks
47 |
48 | ## Output encoding
49 |
50 | - [ ] Conduct all output encoding on a trusted system (server side not client side)
51 |
52 | - [ ] Utilize a standard, tested routine for each type of outbound encoding
53 |
54 | - [ ] Specify character sets, such as UTF-8, for all outputs
55 |
56 | - [ ] Contextually output encode all data returned to the client from untrusted sources
57 |
58 | - [ ] Ensure the output encoding is safe for all target systems
59 |
60 | - [ ] Contextually sanitize all output of un-trusted data to queries for SQL, XML, and LDAP
61 |
62 | - [ ] Sanitize all output of untrusted data to operating system commands
63 |
64 | ## Authentication and password management
65 |
66 | - [ ] Require authentication for all pages and resources, except those
67 | specifically intended to be public
68 |
69 | - [ ] All authentication controls must be enforced on a trusted system
70 |
71 | - [ ] Establish and utilize standard, tested, authentication services whenever possible
72 |
73 | - [ ] Use a centralized implementation for all authentication controls,
74 | including libraries that call external authentication services
75 |
76 | - [ ] Segregate authentication logic from the resource being requested and
77 | use redirection to and from the centralized authentication control
78 |
79 | - [ ] All authentication controls should fail securely
80 |
81 | - [ ] All administrative and account management functions must be at least
82 | as secure as the primary authentication mechanism
83 |
84 | - [ ] If your application manages a credential store, use cryptographically strong one-way salted hashes
85 |
86 | - [ ] Password hashing must be implemented on a trusted system server side not client side)
87 |
88 | - [ ] Validate the authentication data only on completion of all data input
89 |
90 | - [ ] Authentication failure responses should not indicate which part of the authentication data was incorrect
91 |
92 | - [ ] Utilize authentication for connections to external systems that involve sensitive information or functions
93 |
94 | - [ ] Authentication credentials for accessing services external to the
95 | application should be stored in a secure store
96 |
97 | - [ ] Use only HTTP POST requests to transmit authentication credentials
98 |
99 | - [ ] Only send non-temporary passwords over an encrypted connection or as encrypted data
100 |
101 | - [ ] Enforce password complexity requirements established by policy or regulation
102 |
103 | - [ ] Enforce password length requirements established by policy or regulation
104 |
105 | - [ ] Password entry should be obscured on the user\'s screen
106 |
107 | - [ ] Enforce account disabling after an established number of invalid login attempts
108 |
109 | - [ ] Password reset and changing operations require the same level of
110 | controls as account creation and authentication
111 |
112 | - [ ] Password reset questions should support sufficiently random answers
113 |
114 | - [ ] If using email based resets, only send email to a pre-registered
115 | address with a temporary link/password
116 |
117 | - [ ] Temporary passwords and links should have a short expiration time
118 |
119 | - [ ] Enforce the changing of temporary passwords on the next use
120 |
121 | - [ ] Notify users when a password reset occurs
122 |
123 | - [ ] Prevent password re-use
124 |
125 | - [ ] Passwords should be at least one day old before they can be changed,
126 | to prevent attacks on password re-use
127 |
128 | - [ ] Enforce password changes based on requirements established in policy
129 | or regulation, with the time between resets administratively controlled
130 |
131 | - [ ] Disable \"remember me\" functionality for password fields
132 |
133 | - [ ] The last use (successful or unsuccessful) of a user account should
134 | be reported to the user at their next successful login
135 |
136 | - [ ] Implement monitoring to identify attacks against multiple user accounts, utilizing the same password
137 |
138 | - [ ] Change all vendor-supplied default passwords and user IDs or disable the associated accounts
139 |
140 | - [ ] Re-authenticate users prior to performing critical operations
141 |
142 | - [ ] Use Multi-Factor Authentication for highly sensitive or high value transactional accounts
143 |
144 | - [ ] If using third party code for authentication, inspect the code
145 | carefully to ensure it is not affected by any malicious code
146 |
147 | ## Session management
148 |
149 | - [ ] Use the server or framework's session management controls. The
150 | application should recognize only these session identifiers as
151 | valid
152 |
153 | - [ ] Session identifier creation must always be done on a trusted system (server side not client side)
154 |
155 | - [ ] Session management controls should use well vetted algorithms that
156 | ensure sufficiently random session identifiers
157 |
158 | - [ ] Set the domain and path for cookies containing authenticated session
159 | identifiers to an appropriately restricted value for the site
160 |
161 | - [ ] Logout functionality should fully terminate the associated session or connection
162 |
163 | - [ ] Logout functionality should be available from all pages protected by authorization
164 |
165 | - [ ] Establish a session inactivity timeout that is as short as possible,
166 | based on balancing risk and business functional requirements
167 |
168 | - [ ] Disallow persistent logins and enforce periodic session
169 | terminations, even when the session is active
170 |
171 | - [ ] If a session was established before login, close that session and
172 | establish a new session after a successful login
173 |
174 | - [ ] Generate a new session identifier on any re-authentication
175 |
176 | - [ ] Do not allow concurrent logins with the same user ID
177 |
178 | - [ ] Do not expose session identifiers in URLs, error messages or logs
179 |
180 | - [ ] Implement appropriate access controls to protect server side session data
181 | from unauthorized access from other users of the server
182 |
183 | - [ ] Generate a new session identifier and deactivate the old one periodically
184 |
185 | - [ ] Generate a new session identifier if the connection security changes
186 | from HTTP to HTTPS, as can occur during authentication
187 |
188 | - [ ] Consistently utilize HTTPS rather than switching between HTTP to HTTPS
189 |
190 | - [ ] Supplement standard session management for sensitive server-side
191 | operations, like account management, by utilizing per-session
192 | strong random tokens or parameters
193 |
194 | - [ ] Supplement standard session management for highly sensitive or
195 | critical operations by utilizing per-request, as opposed to
196 | per-session, strong random tokens or parameters
197 |
198 | - [ ] Set the \"secure\" attribute for cookies transmitted over an TLS connection
199 |
200 | - [ ] Set cookies with the HttpOnly attribute, unless you specifically
201 | require client-side scripts within your application to read or set
202 | a cookie\'s value
203 |
204 | ## Access control
205 |
206 | - [ ] Use only trusted system objects, e.g. server side session objects,
207 | for making access authorization decisions
208 |
209 | - [ ] Use a single site-wide component to check access authorization. This
210 | includes libraries that call external authorization services
211 |
212 | - [ ] Access controls should fail securely
213 |
214 | - [ ] Deny all access if the application cannot access its security
215 | configuration information
216 |
217 | - [ ] Enforce authorization controls on every request, including those made by server side scripts
218 |
219 | - [ ] Segregate privileged logic from other application code
220 |
221 | - [ ] Restrict access to files or other resources, including those outside
222 | the application\'s direct control, to only authorized users
223 |
224 | - [ ] Restrict access to protected URLs to only authorized users
225 |
226 | - [ ] Restrict access to protected functions to only authorized users
227 |
228 | - [ ] Restrict direct object references to only authorized users
229 |
230 | - [ ] Restrict access to services to only authorized users
231 |
232 | - [ ] Restrict access to application data to only authorized users
233 |
234 | - [ ] Restrict access to user and data attributes and policy information used by access controls
235 |
236 | - [ ] Restrict access security-relevant configuration information to only authorized users
237 |
238 | - [ ] Server side implementation and presentation layer representations of access control rules must match
239 |
240 | - [ ] If state data must be stored on the client, use encryption and integrity checking on the server side
241 | to detect state tampering
242 |
243 | - [ ] Enforce application logic flows to comply with business rules
244 |
245 | - [ ] Limit the number of transactions a single user or device can perform
246 | in a given period of time, low enough to deter automated attacks
247 | but above the actual business requirement
248 |
249 | - [ ] Use the \"referer\" header as a supplemental check only, it should
250 | never be the sole authorization check as it is can be spoofed
251 |
252 | - [ ] If long authenticated sessions are allowed, periodically re-validate
253 | a user's authorization to ensure that their privileges have not
254 | changed and if they have, log the user out and force them to
255 | re-authenticate
256 |
257 | - [ ] Implement account auditing and enforce the disabling of unused accounts
258 |
259 | - [ ] The application must support disabling of accounts
260 | and terminating sessions when authorization ceases
261 |
262 | - [ ] Service accounts or accounts supporting connections to or from
263 | external systems should have the least privilege possible
264 |
265 | - [ ] Create an Access Control Policy to document an application\'s
266 | business rules, data types and access authorization criteria
267 | and/or processes so that access can be properly provisioned and
268 | controlled. This includes identifying access requirements for both
269 | the data and system resources
270 |
271 | ## Cryptographic practices
272 |
273 | - [ ] All cryptographic functions used to protect secrets from the
274 | application user must be implemented on a trusted system
275 |
276 | - [ ] Protect secrets from unauthorized access
277 |
278 | - [ ] Cryptographic modules should fail securely
279 |
280 | - [ ] All random numbers, random file names, random GUIDs, and random
281 | strings should be generated using the cryptographic module's
282 | approved random number generator
283 |
284 | - [ ] Cryptographic modules used by the application should be compliant to
285 | FIPS 140-2 or an equivalent standard
286 |
287 | - [ ] Establish and utilize a policy and process for how cryptographic
288 | keys will be managed
289 |
290 | ## Error handling and logging
291 |
292 | - [ ] Do not disclose sensitive information in error responses, including
293 | system details, session identifiers or account information
294 |
295 | - [ ] Use error handlers that do not display debugging or stack trace information
296 |
297 | - [ ] Implement generic error messages and use custom error pages
298 |
299 | - [ ] The application should handle application errors and not rely on the server configuration
300 |
301 | - [ ] Properly free allocated memory when error conditions occur
302 |
303 | - [ ] Error handling logic associated with security controls should deny access by default
304 |
305 | - [ ] All logging controls should be implemented on a trusted system
306 |
307 | - [ ] Logging controls should support both success and failure of specified security events
308 |
309 | - [ ] Ensure logs contain important log event data
310 |
311 | - [ ] Ensure log entries that include un-trusted data will not execute as
312 | code in the intended log viewing interface or software
313 |
314 | - [ ] Restrict access to logs to only authorized individuals
315 |
316 | - [ ] Utilize a central routine for all logging operations
317 |
318 | - [ ] Do not store sensitive information in logs, including unnecessary
319 | system details, session identifiers or passwords
320 |
321 | - [ ] Ensure that a mechanism exists to conduct log analysis
322 |
323 | - [ ] Log all input validation failures
324 |
325 | - [ ] Log all authentication attempts, especially failures
326 |
327 | - [ ] Log all access control failures
328 |
329 | - [ ] Log all apparent tampering events, including unexpected changes to state data
330 |
331 | - [ ] Log attempts to connect with invalid or expired session tokens
332 |
333 | - [ ] Log all system exceptions
334 |
335 | - [ ] Log all administrative functions, including changes to the security configuration settings
336 |
337 | - [ ] Log all backend TLS connection failures
338 |
339 | - [ ] Log cryptographic module failures
340 |
341 | - [ ] Use a cryptographic hash function to validate log entry integrity
342 |
343 | ## Data protection
344 |
345 | - [ ] Implement least privilege, restrict users to only the functionality,
346 | data and system information that is required to perform their
347 | tasks
348 |
349 | - [ ] Protect all cached or temporary copies of sensitive data stored on
350 | the server from unauthorized access and purge those temporary
351 | working files a soon as they are no longer required.
352 |
353 | - [ ] Encrypt highly sensitive stored information, such as authentication
354 | verification data, even if on the server side
355 |
356 | - [ ] Protect server-side source-code from being downloaded by a user
357 |
358 | - [ ] Do not store passwords, connection strings or other sensitive
359 | information in clear text or in any non-cryptographically secure
360 | manner on the client side
361 |
362 | - [ ] Remove comments in user accessible production code that may reveal
363 | backend system or other sensitive information
364 |
365 | - [ ] Remove unnecessary application and system documentation as this can
366 | reveal useful information to attackers
367 |
368 | - [ ] Do not include sensitive information in HTTP GET request parameters
369 |
370 | - [ ] Disable auto complete features on forms expected to contain
371 | sensitive information, including authentication
372 |
373 | - [ ] Disable client side caching on pages containing sensitive information
374 |
375 | - [ ] The application should support the removal of sensitive data when
376 | that data is no longer required
377 |
378 | - [ ] Implement appropriate access controls for sensitive data stored on
379 | the server. This includes cached data, temporary files and data
380 | that should be accessible only by specific system users
381 |
382 | ## Communication security
383 |
384 | - [ ] Implement encryption for the transmission of all sensitive
385 | information. This should include TLS for protecting the connection
386 | and may be supplemented by discrete encryption of sensitive files
387 | or non-HTTP based connections
388 |
389 | - [ ] TLS certificates should be valid and have the correct domain name,
390 | not be expired, and be installed with intermediate certificates
391 | when required
392 |
393 | - [ ] Failed TLS connections should not fall back to an insecure connection
394 |
395 | - [ ] Utilize TLS connections for all content requiring authenticated access and for all other sensitive information
396 |
397 | - [ ] Utilize TLS for connections to external systems that involve sensitive information or functions
398 |
399 | - [ ] Utilize a single standard TLS implementation that is configured appropriately
400 |
401 | - [ ] Specify character encodings for all connections
402 |
403 | - [ ] Filter parameters containing sensitive information from the HTTP referer, when linking to external sites
404 |
405 | ## System configuration
406 |
407 | - [ ] Ensure servers, frameworks and system components are running the latest approved version
408 |
409 | - [ ] Ensure servers, frameworks and system components have all patches issued for the version in use
410 |
411 | - [ ] Turn off directory listings
412 |
413 | - [ ] Restrict the web server, process and service accounts to the least privileges possible
414 |
415 | - [ ] When exceptions occur, fail securely
416 |
417 | - [ ] Remove all unnecessary functionality and files
418 |
419 | - [ ] Remove test code or any functionality not intended for production, prior to deployment
420 |
421 | - [ ] Prevent disclosure of your directory structure in the robots.txt
422 | file by placing directories not intended for public indexing into
423 | an isolated parent directory
424 |
425 | - [ ] Define which HTTP methods, Get or Post, the application will support
426 | and whether it will be handled differently in different pages in
427 | the application
428 |
429 | - [ ] Disable unnecessary HTTP methods
430 |
431 | - [ ] If the web server handles different versions of HTTP ensure that they
432 | are configured in a similar manner and ensure any differences are understood
433 |
434 | - [ ] Remove unnecessary information from HTTP response headers related to
435 | the OS, web-server version and application frameworks
436 |
437 | - [ ] The security configuration store for the application should be able
438 | to be output in human readable form to support auditing
439 |
440 | - [ ] Implement an asset management system and register system components
441 | and software in it
442 |
443 | - [ ] Isolate development environments from the production network and
444 | provide access only to authorized development and test groups
445 |
446 | - [ ] Implement a software change control system to manage and record
447 | changes to the code both in development and production
448 |
449 | ## Database security
450 |
451 | - [ ] Use strongly typed parameterized queries
452 |
453 | - [ ] Utilize input validation and output encoding and be sure to address
454 | meta characters. If these fail, do not run the database command
455 |
456 | - [ ] Ensure that variables are strongly typed
457 |
458 | - [ ] The application should use the lowest possible level of privilege
459 | when accessing the database
460 |
461 | - [ ] Use secure credentials for database access
462 |
463 | - [ ] Connection strings should not be hard coded within the application.
464 | Connection strings should be stored in a separate configuration
465 | file on a trusted system and they should be encrypted.
466 |
467 | - [ ] Use stored procedures to abstract data access and allow for the
468 | removal of permissions to the base tables in the database
469 |
470 | - [ ] Close the connection as soon as possible
471 |
472 | - [ ] Remove or change all default database administrative passwords
473 |
474 | - [ ] Turn off all unnecessary database functionality
475 |
476 | - [ ] Remove unnecessary default vendor content (for example sample schemas)
477 |
478 | - [ ] Disable any default accounts that are not required to support business requirements
479 |
480 | - [ ] The application should connect to the database with different
481 | credentials for every trust distinction (for example user, read-only
482 | user, guest, administrators)
483 |
484 | ## File management
485 |
486 | - [ ] Do not pass user supplied data directly to any dynamic include function
487 |
488 | - [ ] Require authentication before allowing a file to be uploaded
489 |
490 | - [ ] Limit the type of files that can be uploaded to only those types
491 | that are needed for business purposes
492 |
493 | - [ ] Validate uploaded files are the expected type by checking file
494 | headers rather than by file extension
495 |
496 | - [ ] Do not save files in the same web context as the application
497 |
498 | - [ ] Prevent or restrict the uploading of any file that may be
499 | interpreted by the web server.
500 |
501 | - [ ] Turn off execution privileges on file upload directories
502 |
503 | - [ ] Implement safe uploading in UNIX by mounting the targeted file
504 | directory as a logical drive using the associated path or the
505 | chrooted environment
506 |
507 | - [ ] When referencing existing files, use an allow-list of allowed file names and types
508 |
509 | - [ ] Do not pass user supplied data into a dynamic redirect
510 |
511 | - [ ] Do not pass directory or file paths, use index values mapped to pre-defined list of paths
512 |
513 | - [ ] Never send the absolute file path to the client
514 |
515 | - [ ] Ensure application files and resources are read-only
516 |
517 | - [ ] Scan user uploaded files for viruses and malware
518 |
519 | ## Memory management
520 |
521 | - [ ] Utilize input and output controls for untrusted data
522 |
523 | - [ ] Check that the buffer is as large as specified
524 |
525 | - [ ] When using functions that accept a number of bytes ensure that NULL terminatation is handled correctly
526 |
527 | - [ ] Check buffer boundaries if calling the function in a loop and protect against overflow
528 |
529 | - [ ] Truncate all input strings to a reasonable length before passing them to other functions
530 |
531 | - [ ] Specifically close resources, don't rely on garbage collection
532 |
533 | - [ ] Use non-executable stacks when available
534 |
535 | - [ ] Avoid the use of known vulnerable functions
536 |
537 | - [ ] Properly free allocated memory upon the completion of functions and at all exit points
538 |
539 | - [ ] Overwrite any sensitive information stored in allocated memory at all exit points from the function
540 |
541 | ## General coding practices
542 |
543 | - [ ] Use tested and approved managed code rather than creating new unmanaged code for common tasks
544 |
545 | - [ ] Utilize task specific built-in APIs to conduct operating system
546 | tasks. Do not allow the application to issue commands directly to
547 | the Operating System, especially through the use of application
548 | initiated command shells
549 |
550 | - [ ] Use checksums or hashes to verify the integrity of interpreted code,
551 | libraries, executables, and configuration files
552 |
553 | - [ ] Utilize locking to prevent multiple simultaneous requests or use a
554 | synchronization mechanism to prevent race conditions
555 |
556 | - [ ] Protect shared variables and resources from inappropriate concurrent
557 | access
558 |
559 | - [ ] Explicitly initialize all your variables and other data stores,
560 | either during declaration or just before the first usage
561 |
562 | - [ ] In cases where the application must run with elevated privileges,
563 | raise privileges as late as possible, and drop them as soon as
564 | possible
565 |
566 | - [ ] Avoid calculation errors by understanding your programming language\'s underlying representation
567 |
568 | - [ ] Do not pass user supplied data to any dynamic execution function
569 |
570 | - [ ] Restrict users from generating new code or altering existing code
571 |
572 | - [ ] Review all secondary applications, third party code and libraries to
573 | determine business necessity and validate safe functionality
574 |
575 | - [ ] Implement safe updating using encrypted channels
576 |
577 | \newpage
578 |
--------------------------------------------------------------------------------
/draft-en/02-checklist/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices - Draft
5 | tags: SCPQRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Secure Coding Practices Checklist
12 |
13 | 2.1 [Input validation](05-checklist.md#input-validation)
14 |
15 | 2.2 [Output encoding](05-checklist.md#output-encoding)
16 |
17 | 2.3 [Authentication and password management](05-checklist.md#authentication-and-password-management)
18 |
19 | 2.4 [Session management](05-checklist.md#session-management)
20 |
21 | 2.5 [Access control](05-checklist.md#access-control)
22 |
23 | 2.6 [Cryptographic practices](05-checklist.md#cryptographic-practices)
24 |
25 | 2.7 [Error handling and logging](05-checklist.md#error-handling-and-logging)
26 |
27 | 2.8 [Data protection](05-checklist.md#data-protection)
28 |
29 | 2.9 [Communication security](05-checklist.md#communication-security)
30 |
31 | 2.10 [System configuration](05-checklist.md#system-configuration)
32 |
33 | 2.11 [Database security](05-checklist.md#database-security)
34 |
35 | 2.12 [File management](05-checklist.md#file-management)
36 |
37 | 2.13 [Memory management](05-checklist.md#memory-management)
38 |
39 | 2.14 [General coding practices](05-checklist.md#general-coding-practices)
40 |
--------------------------------------------------------------------------------
/draft-en/02-checklist/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="draft-en" %}
2 |
--------------------------------------------------------------------------------
/draft-en/03-appendices/03-overview.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices - Draft
5 | tags: SCP-QRG
6 |
7 | ---
8 |
9 | {% include breadcrumb.html %}
10 | # Appendix A: Software Security and Risk Principles Overview
11 |
12 | Building secure software requires a basic understanding of security
13 | principles. While a comprehensive review of security principles is
14 | beyond the scope of this guide, a quick overview is provided.
15 |
16 | The goal of software security is to maintain the
17 | confidentiality, integrity, and availability of information resources in order to
18 | enable successful business operations.
19 | This goal is accomplished through the implementation of security controls.
20 | This guide focuses on the technical controls specific to
21 | mitigating the occurrence of common software vulnerabilities.
22 | While the primary focus is web applications and their supporting infrastructure,
23 | most of the guidance can be applied to any software deployment platform.
24 |
25 | It is helpful to understand what is meant by risk, in order to protect
26 | the business from unacceptable risks associated with its reliance on
27 | software. Risk is a combination of factors that threaten the success of
28 | the business. This can be described conceptually as follows: a threat
29 | agent interacts with a system, which may have a vulnerability that can be
30 | exploited in order to cause an impact. While
31 | this may seem like an abstract concept, think of it this way: a car
32 | burglar (threat agent) goes through a parking lot checking cars (the
33 | system) for unlocked doors (the vulnerability) and when they find one,
34 | they open the door (the exploit) and take whatever is inside (the
35 | impact). All of these factors play a role in secure software
36 | development.
37 |
38 | There is a fundamental difference between the approach taken by a
39 | development team and that taken by someone attacking an application. A
40 | development team typically approaches an application based on what it is
41 | intended to do. In other words, they are designing an application to
42 | perform specific tasks based on documented functional requirements and
43 | use cases. An attacker, on the other hand, is more interested in what an
44 | application can be made to do and operates on the principle that \"any
45 | action not specifically denied, is allowed\". To address this, some
46 | additional elements need to be integrated into the early stages of the
47 | software lifecycle. These new elements are [*security
48 | requirements*](#Security_Requirements) and [*abuse cases*](#Abuse_Case).
49 | This guide is designed to help with identifying high level security
50 | requirements and addressing many common abuse scenarios.
51 |
52 | It is important for web development teams to understand that client side
53 | controls like client based input validation, hidden fields and interface
54 | controls (e.g., pull downs and radio buttons), provide little if any
55 | security benefit. An attacker can use tools like client side web proxies
56 | (e.g. OWASP ZAP, Burp) or network packet capture tools (e.g.,
57 | WireShark) to analyze application traffic and submit custom built
58 | requests, bypassing the interface all together. Additionally, Flash,
59 | Java Applets and other client side objects can be decompiled and
60 | analyzed for flaws.
61 |
62 | Software security flaws can be introduced at any stage of the software
63 | development lifecycle, including:
64 |
65 | - Not identifying security requirements up front
66 |
67 | - Creating conceptual designs that have logic errors
68 |
69 | - Using poor coding practices that introduce technical vulnerabilities
70 |
71 | - Deploying the software improperly
72 |
73 | - Introducing flaws during maintenance or updating
74 |
75 | Furthermore, it is important to understand that software vulnerabilities
76 | can have a scope beyond the software itself. Depending on the nature of
77 | the software, the vulnerability and the supporting infrastructure, the
78 | impacts of a successful exploitation can include compromises to any or
79 | all of the following:
80 |
81 | - The software and its associated information
82 |
83 | - The operating systems of the associated servers
84 |
85 | - The backend database
86 |
87 | - Other applications in a shared environment
88 |
89 | - The user\'s system
90 |
91 | - Other software that the user interacts with
92 |
93 | \newpage
94 |
--------------------------------------------------------------------------------
/draft-en/03-appendices/05-glossary.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices - Draft
5 | tags: SCP-QRG
6 |
7 | ---
8 |
9 | {% include breadcrumb.html %}
10 | # Appendix B: Glossary
11 |
12 | **Abuse case:** Describes the intentional and
13 | unintentional misuses of the software. Abuse cases should challenge the
14 | assumptions of the system design.
15 |
16 | **Access control:** A set of controls that grant or deny a user, or
17 | other entity, access to a system resource. This is usually based on
18 | hierarchical roles and individual privileges within a role, but also
19 | includes system to system interactions.
20 |
21 | **Account disabling:** Account disabling after an established number of invalid
22 | login attempts (e.g., five attempts is common). The account must
23 | be disabled for a period of time sufficient to discourage brute
24 | force guessing of credentials, but not so long as to allow for a
25 | denial-of-service attack to be performed
26 |
27 | **Authentication:** A set of controls that are used to verify the
28 | identity of a user, or other entity, interacting with the software.
29 |
30 | Authentication failure responses should not indicate which part of
31 | the authentication data was incorrect. For example, instead of
32 | \"Invalid username\" or \"Invalid password\", just use \"Invalid
33 | username and/or password\" for both. Error responses must be truly
34 | identical in both display and source code
35 |
36 | **Availability:** A measure of a system\'s accessibility and usability.
37 |
38 | **Calculation errors:** Avoid calculation errors by understanding your programming
39 | language\'s underlying representation and how it interacts with
40 | numeric calculation. Pay close attention to byte size
41 | discrepancies, precision, signed/unsigned distinctions,
42 | truncation, conversion and casting between types, \"not-a-number\"
43 | calculations, and how your language handles numbers that are too
44 | large or too small for its underlying representation
45 |
46 | **Canonicalize:** To reduce various encodings
47 | and representations of data to a single simple form.
48 |
49 | **Communication security:** A set of controls that help ensure the
50 | software handles the sending and receiving of information in a secure
51 | manner.
52 |
53 | **Confidentiality:** To ensure that information is disclosed only to authorized parties.
54 |
55 | **Contextual output encoding:**
56 | Encoding output data based on how it will be utilized by the
57 | application. The specific methods vary depending on the way the output
58 | data is used. If the data is to be included in the response to the
59 | client, account for inclusion scenarios like: the body of an HTML
60 | document, an HTML attribute, within JavaScript, within a CSS or in a URL.
61 | You must also account for other use cases like SQL queries, XML and LDAP.
62 | Consider HTML entity encoding, but this may not work in all cases.
63 |
64 | **Cross Site Request Forgery (CSRF):**
65 | An external website or application forces a client to make an unintended
66 | request to another application that the client has an active session
67 | with. Applications are vulnerable when they use known, or predictable,
68 | URLs and parameters; and when the browser automatically transmits all
69 | required session information with each request to the vulnerable
70 | application.
71 |
72 | **Cryptographic practices:** A set of controls that ensure cryptographic
73 | operations within the application are handled securely.
74 |
75 | **Data protection:** A set of controls that help ensure the software
76 | handles the storing of information in a secure manner.
77 |
78 | **Database security:** A set of controls that ensure that software
79 | interacts with a database in a secure manner and that the database is
80 | configured securely.
81 |
82 | **Error handling and logging:** A set of practices that ensure the
83 | application handles errors safely and conducts proper event logging.
84 |
85 | **Exploit:** To take advantage of a vulnerability.
86 | Typically this is an intentional action designed to compromise the
87 | software\'s security controls by leveraging a vulnerability.
88 |
89 | **File management:** A set of controls that cover the interaction
90 | between the code and other system files.
91 |
92 | **General coding practices:** A set of controls that cover coding
93 | practices that do not fit easily into other categories.
94 |
95 | **Hazardous character:** Any character
96 | or encoded representation of a character that can effect the intended
97 | operation of the application or associated system by being interpreted
98 | to have a special meaning, outside the intended use of the character.
99 | These characters may be used to:
100 |
101 | * Altering the structure of existing code or statements
102 | * Inserting new unintended code
103 | * Altering paths
104 | * Causing unexpected outcomes from program functions or routines
105 | * Causing error conditions
106 | * Compromise downstream applications or systems
107 |
108 | If any potentially hazardous characters
109 | must be allowed as input, be sure that you implement additional
110 | controls like output encoding, secure task specific APIs and
111 | accounting for the utilization of that data throughout the
112 | application . Examples of common hazardous characters include:
113 | > \< \> \" \' % ( ) & + \\ \\\' \\\"
114 |
115 | * Check for new line characters (%0d, %0a, \\r, \\n)
116 | * Check for "dot-dot-slash\" (../ or ..\\) path alterations
117 | characters. In cases where UTF-8 extended character set
118 | encoding is supported, address alternate representation like:
119 | %c0%ae%c0%ae/
120 |
121 | **HTML eEntity encode:** The process of
122 | replacing certain ASCII characters with their HTML entity equivalents.
123 | For example, encoding would replace the less than character \"\<\" with
124 | the HTML equivalent \"<\". HTML entities are \'inert\' in most
125 | interpreters, especially browsers, which can mitigate certain client
126 | side attacks.
127 |
128 | **Impact:** A measure of the negative effect to the
129 | business that results from the occurrence of an undesired event; what
130 | would be the result of a vulnerability being exploited.
131 |
132 | **Input validation:** A set of controls that verify the properties of
133 | all input data matches what is expected by the application including
134 | types, lengths, ranges, acceptable character sets and does not include
135 | known hazardous characters.
136 |
137 | **Integrity:** The assurance that information is
138 | accurate, complete and valid, and has not been altered by an
139 | unauthorized action.
140 |
141 | **Log event data:** This should include the following:
142 |
143 | 1. Time stamp from a trusted system component
144 | 2. Severity rating for each event
145 | 3. Tagging of security relevant events, if they are mixed with other log entries
146 | 4. Identity of the account/user that caused the event
147 | 5. Source IP address associated with the request
148 | 6. Event outcome (success or failure)
149 | 7. Description of the event
150 |
151 | Implement monitoring to identify attacks against multiple user
152 | accounts, utilizing the same password. This attack pattern is used
153 | to bypass standard lockouts, when user IDs can be harvested or
154 | guessed.
155 |
156 | **Memory management:** A set of controls that address memory and buffer usage.
157 |
158 | **Mitigate:** Steps taken to reduce the severity of
159 | a vulnerability. These can include removing a vulnerability, making a
160 | vulnerability more difficult to exploit, or reducing the negative impact
161 | of a successful exploitation.
162 |
163 | **Multi-Factor Authentication (MFA):** An authentication process that requires
164 | the user to produce multiple distinct types of credentials.
165 | Typically this is based on something:
166 |
167 | * they have, for example a mobile/cell phone
168 | * something they know, for example a PIN
169 | * something they are, for example data from a biometric reader
170 |
171 | **Output encoding:** A set of controls addressing the use of encoding to
172 | ensure data output by the application is safe.
173 |
174 | **Parameterized queries / prepared statements:**
175 | Keeps the query and data separate through the use of
176 | placeholders. The query structure is defined with place holders, the SQL
177 | statement is sent to the database and prepared, and then the prepared
178 | statement is combined with the parameter values. The prevents the query
179 | from being altered, because the parameter values are combined with the
180 | compiled statement, not a SQL string.
181 |
182 | **Password complexity**: Password complexity requirements established by policy or
183 | regulation. Authentication credentials should be sufficient to
184 | withstand attacks that are typical of the threats in the deployed
185 | environment. (e.g., requiring the use of alphabetic as well as
186 | numeric and/or special characters).
187 |
188 | **Password length:** Password length requirements established by policy or
189 | regulation. Eight characters is commonly used, but 16 is better or
190 | consider the use of multi-word pass phrases
191 |
192 | **Persistent logins**: Disallow persistent logins and enforce periodic session
193 | terminations, even when the session is active. Especially for
194 | applications supporting rich network connections or connecting to
195 | critical systems. Termination times should support business
196 | requirements and the user should receive sufficient notification
197 | to mitigate negative impacts
198 |
199 | **Safe updates:** Method of updating the application from trusted sources.
200 | If the application utilizes automatic
201 | updates, then use cryptographic signatures for your code and
202 | ensure your download clients verify those signatures. Use
203 | encrypted channels to transfer the code from the host server
204 |
205 | **Sanitize data:** The process of making
206 | potentially harmful data safe through the use of data removal,
207 | replacement, encoding or escaping of the characters.
208 |
209 | **Security controls:** An action that
210 | mitigates a potential vulnerability and helps ensure that the software
211 | behaves only in the expected manner.
212 |
213 | **Security requirements:** A set of
214 | design and functional requirements that help ensure the software is
215 | built and deployed in a secure manner.
216 |
217 | **Sequential authentication:**
218 | When authentication data is requested on successive pages rather than
219 | being requested all at once on a single page.
220 |
221 | **Session management:** A set of controls that help ensure web
222 | applications handle HTTP sessions in a secure manner.
223 |
224 | Do not expose session identifiers in URLs, error messages or logs.
225 | Session identifiers should only be located in the HTTP cookie
226 | header. For example, do not pass session identifiers as GET
227 | parameters
228 |
229 | **State data:** When data or parameters are used,
230 | by the application or server, to emulate a persistent connection or
231 | track a client\'s status across a multi-request process or transaction.
232 |
233 | **System:** A generic term covering the operating
234 | systems, web server, application frameworks and related infrastructure.
235 |
236 | **System configuration:** A set of controls that help ensure the
237 | infrastructure components supporting the software are deployed securely.
238 |
239 | **Threat Agent:** Any entity which may have a
240 | negative impact on the system. This may be a malicious user who wants to
241 | compromise the system\'s security controls; however, it could also be an
242 | accidental misuse of the system or a more physical threat like fire or
243 | flood.
244 |
245 | **Trust boundaries:** Typically a trust
246 | boundary constitutes the components of the system under your direct
247 | control. All connections and data from systems outside of your direct
248 | control, including all clients and systems managed by other parties,
249 | should be consider untrusted and be validated at the boundary before
250 | allowing further system interaction.
251 |
252 | **Vulnerability:** A weakness that makes the system susceptible to attack or damage.
253 |
254 | \newpage
255 |
--------------------------------------------------------------------------------
/draft-en/03-appendices/07-references.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices - Draft
5 | tags: SCP-QRG
6 |
7 | ---
8 |
9 | {% include breadcrumb.html %}
10 | # Appendix C: External References
11 |
12 | ## Cited References
13 |
14 | - SANS CIS Controls version 8
15 |
16 | >
17 |
18 | - Web Application Security Consortium
19 |
20 | >
21 |
22 | - Common Weakness Enumeration (CWE)
23 |
24 | >
25 |
26 | - CERT Secure Coding
27 |
28 | >
29 |
30 | - MSDN Security Developer Center
31 |
32 | >
33 |
34 |
35 | ## Security Advisory Sites
36 |
37 | Useful resources to check for known vulnerabilities against supporting
38 | infrastructure and frameworks
39 |
40 | > Secunia Citrix Vulnerability List:
41 |
42 | -
43 |
44 | > Common Vulnerability Enumeration:
45 |
46 | -
47 |
--------------------------------------------------------------------------------
/draft-en/03-appendices/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices - Draft
5 | tags: SCPQRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ### Appendix A. [Overview](03-overview.md)
12 |
13 | ### Appendix B. [Glossary](05-glossary.md)
14 |
15 | ### Appendix C. [External References](07-references.md)
16 |
--------------------------------------------------------------------------------
/draft-en/03-appendices/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="draft-en" %}
2 |
--------------------------------------------------------------------------------
/draft-en/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices - Draft
5 | tags: SCPQRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ## Table of Contents
12 |
13 | ### 1. [Introduction](01-introduction/05-introduction.md)
14 |
15 | ### 2. [Checklist](02-checklist/05-checklist.md)
16 |
17 | ### Appendix A. [Overview](03-appendices/03-overview.md)
18 |
19 | ### Appendix B. [Glossary](03-appendices/05-glossary.md)
20 |
21 | ### Appendix C. [External References](03-appendices/07-references.md)
22 |
--------------------------------------------------------------------------------
/draft-en/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="draft-en" %}
2 |
--------------------------------------------------------------------------------
/draft-en/title.pdf.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | lang: en-US
3 | author: Open Worldwide Application Security Project (OWASP)
4 | version: Draft
5 | date: February 2023 onwards
6 | rights: Creative Commons Attribution ShareAlike 4.0 International (CC BY-SA 4.0)
7 | geometry: "left=3cm,right=2.5cm,top=2cm,bottom=2cm"
8 | header-includes: |
9 | \usepackage{fancyhdr}
10 | \pagestyle{fancy}
11 | \fancyhead{}
12 | \fancyhead[RE,RO]{February 2023 onwards}
13 | \fancyfoot{}
14 | \fancyfoot[LE,LO]{Draft version}
15 | \fancyfoot[RE,RO]{\thepage}
16 | ...
17 |
--------------------------------------------------------------------------------
/draft-en/title.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | lang: en-US
3 | title:
4 | - type: main
5 | text: Secure Coding Practices
6 | - type: subtitle
7 | text: Quick Reference Guide
8 | creator:
9 | - role: author
10 | text: Open Worldwide Application Security Project (OWASP)
11 | - role: editor
12 | text: Keith Turpin
13 | version: Draft
14 | date: February 2023 onwards
15 | rights: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
16 | ...
17 |
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: col-sidebar
3 | title: OWASP Secure Coding Practices-Quick Reference Guide
4 | tags: downloads contributors archive
5 | level: 2
6 | type: documentation
7 | ---
8 |
9 | ## Cornucopia
10 |
11 | [Version 2.1][en21pdf] of the Secure Coding Practices quick reference guide
12 | provides the numbering system used in the [Cornucopia project][cornucopia] playing cards.
13 |
14 | ### Archived project
15 |
16 | The OWASP Secure Coding Practices Quick-reference Guide project has now been archived.
17 |
18 | The content of the Secure Coding Practices Quick-reference Guide overview and glossary has been migrated
19 | to various sections within the [OWASP Developer Guide][owaspdevguide].
20 |
21 | The Secure Coding Practices Quick-reference Guide checklists have also been migrated to the Developer Guide;
22 | this provides a wider audience for the original checklist.
23 |
24 | Contact [Jon Gadsden][jon] for any questions about this move.
25 |
26 | ### Archived versions
27 |
28 | The [latest stable Spanish language version](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/stable-es/)
29 | along with the [latest English language version](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/stable-en/)
30 | are still available on these OWASP project pages.
31 |
32 | There is also a [work in progress English language version](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/draft-en/)
33 | that shows the final work before being migrated to the
34 | [OWASP Developer Guide](https://owasp.org/www-project-developer-guide/draft/06-design/02-web-app-checklist/toc.html).
35 |
36 | [cornucopia]: https://owasp.org/www-project-cornucopia/
37 | [en21pdf]: assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.pdf
38 | [jon]: mailto:jon.gadsden@owasp.org
39 | [owaspdevguide]: https://owasp.org/www-project-developer-guide/
40 |
--------------------------------------------------------------------------------
/info.md:
--------------------------------------------------------------------------------
1 | ### Classification
2 |
3 | * Incubator Project
4 | * Documentation
5 |
6 | ### Audience
7 |
8 | * Builder
9 |
10 | ### License
11 |
12 | * [](https://creativecommons.org/licenses/by-sa/4.0/) CC BY-SA 4.0
13 |
14 | ### Code Repository
15 |
16 | * [Repository][repo]
17 | * [Issue Tracker][issues]
18 |
19 | ### Downloads
20 |
21 | * [Cornucopia version][en21pdf]
22 | * [Latest version (English)][stable-en]
23 | * [Latest version (español)][stable-es]
24 | * [Previous versions/languages][previous]
25 |
26 | ### Related Projects
27 |
28 | * [OWASP Go Secure Coding Practices Guide][owaspgoscp]
29 | * [OWASP Developer Guide][owaspdevguide]
30 |
31 | [en21pdf]: assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.pdf
32 | [issues]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/issues
33 | [previous]: https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/#div-download
34 | [repo]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide
35 | [stable-en]: stable-en
36 | [stable-es]: stable-es
37 | [owaspgoscp]: https://owasp.org/www-project-go-secure-coding-practices-guide/
38 | [owaspdevguide]: https://owasp.org/www-project-developer-guide/
39 |
--------------------------------------------------------------------------------
/leaders.md:
--------------------------------------------------------------------------------
1 | #### Editors
2 |
3 | * [Gerardo Canedo][gerardo] (español)
4 | * [Paulo Silva][paulo] (português)
5 | * [Jon Gadsden][jon] (English)
6 |
7 | ### Project leaders
8 |
9 | * [Keith Turpin](mailto:Keith.Turpin@owasp.org)
10 | * [Jon Gadsden](mailto:jon.gadsden@owasp.org)
11 |
12 | [keith]: mailto:Keith.Turpin@owasp.org
13 | [jon]: mailto:jon.gadsden@owasp.org
14 | [gerardo]: mailto:gerardo.canedo@owasp.org
15 | [paulo]: mailto:paulo.silva@owasp.org
16 |
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
1 | Attribution-ShareAlike 4.0 International
2 |
3 | =======================================================================
4 |
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and
6 | does not provide legal services or legal advice. Distribution of
7 | Creative Commons public licenses does not create a lawyer-client or
8 | other relationship. Creative Commons makes its licenses and related
9 | information available on an "as-is" basis. Creative Commons gives no
10 | warranties regarding its licenses, any material licensed under their
11 | terms and conditions, or any related information. Creative Commons
12 | disclaims all liability for damages resulting from their use to the
13 | fullest extent possible.
14 |
15 | Using Creative Commons Public Licenses
16 |
17 | Creative Commons public licenses provide a standard set of terms and
18 | conditions that creators and other rights holders may use to share
19 | original works of authorship and other material subject to copyright
20 | and certain other rights specified in the public license below. The
21 | following considerations are for informational purposes only, are not
22 | exhaustive, and do not form part of our licenses.
23 |
24 | Considerations for licensors: Our public licenses are
25 | intended for use by those authorized to give the public
26 | permission to use material in ways otherwise restricted by
27 | copyright and certain other rights. Our licenses are
28 | irrevocable. Licensors should read and understand the terms
29 | and conditions of the license they choose before applying it.
30 | Licensors should also secure all rights necessary before
31 | applying our licenses so that the public can reuse the
32 | material as expected. Licensors should clearly mark any
33 | material not subject to the license. This includes other CC-
34 | licensed material, or material used under an exception or
35 | limitation to copyright. More considerations for licensors:
36 | wiki.creativecommons.org/Considerations_for_licensors
37 |
38 | Considerations for the public: By using one of our public
39 | licenses, a licensor grants the public permission to use the
40 | licensed material under specified terms and conditions. If
41 | the licensor's permission is not necessary for any reason--for
42 | example, because of any applicable exception or limitation to
43 | copyright--then that use is not regulated by the license. Our
44 | licenses grant only permissions under copyright and certain
45 | other rights that a licensor has authority to grant. Use of
46 | the licensed material may still be restricted for other
47 | reasons, including because others have copyright or other
48 | rights in the material. A licensor may make special requests,
49 | such as asking that all changes be marked or described.
50 | Although not required by our licenses, you are encouraged to
51 | respect those requests where reasonable. More_considerations
52 | for the public:
53 | wiki.creativecommons.org/Considerations_for_licensees
54 |
55 | =======================================================================
56 |
57 | Creative Commons Attribution-ShareAlike 4.0 International Public
58 | License
59 |
60 | By exercising the Licensed Rights (defined below), You accept and agree
61 | to be bound by the terms and conditions of this Creative Commons
62 | Attribution-ShareAlike 4.0 International Public License ("Public
63 | License"). To the extent this Public License may be interpreted as a
64 | contract, You are granted the Licensed Rights in consideration of Your
65 | acceptance of these terms and conditions, and the Licensor grants You
66 | such rights in consideration of benefits the Licensor receives from
67 | making the Licensed Material available under these terms and
68 | conditions.
69 |
70 |
71 | Section 1 -- Definitions.
72 |
73 | a. Adapted Material means material subject to Copyright and Similar
74 | Rights that is derived from or based upon the Licensed Material
75 | and in which the Licensed Material is translated, altered,
76 | arranged, transformed, or otherwise modified in a manner requiring
77 | permission under the Copyright and Similar Rights held by the
78 | Licensor. For purposes of this Public License, where the Licensed
79 | Material is a musical work, performance, or sound recording,
80 | Adapted Material is always produced where the Licensed Material is
81 | synched in timed relation with a moving image.
82 |
83 | b. Adapter's License means the license You apply to Your Copyright
84 | and Similar Rights in Your contributions to Adapted Material in
85 | accordance with the terms and conditions of this Public License.
86 |
87 | c. BY-SA Compatible License means a license listed at
88 | creativecommons.org/compatiblelicenses, approved by Creative
89 | Commons as essentially the equivalent of this Public License.
90 |
91 | d. Copyright and Similar Rights means copyright and/or similar rights
92 | closely related to copyright including, without limitation,
93 | performance, broadcast, sound recording, and Sui Generis Database
94 | Rights, without regard to how the rights are labeled or
95 | categorized. For purposes of this Public License, the rights
96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
97 | Rights.
98 |
99 | e. Effective Technological Measures means those measures that, in the
100 | absence of proper authority, may not be circumvented under laws
101 | fulfilling obligations under Article 11 of the WIPO Copyright
102 | Treaty adopted on December 20, 1996, and/or similar international
103 | agreements.
104 |
105 | f. Exceptions and Limitations means fair use, fair dealing, and/or
106 | any other exception or limitation to Copyright and Similar Rights
107 | that applies to Your use of the Licensed Material.
108 |
109 | g. License Elements means the license attributes listed in the name
110 | of a Creative Commons Public License. The License Elements of this
111 | Public License are Attribution and ShareAlike.
112 |
113 | h. Licensed Material means the artistic or literary work, database,
114 | or other material to which the Licensor applied this Public
115 | License.
116 |
117 | i. Licensed Rights means the rights granted to You subject to the
118 | terms and conditions of this Public License, which are limited to
119 | all Copyright and Similar Rights that apply to Your use of the
120 | Licensed Material and that the Licensor has authority to license.
121 |
122 | j. Licensor means the individual(s) or entity(ies) granting rights
123 | under this Public License.
124 |
125 | k. Share means to provide material to the public by any means or
126 | process that requires permission under the Licensed Rights, such
127 | as reproduction, public display, public performance, distribution,
128 | dissemination, communication, or importation, and to make material
129 | available to the public including in ways that members of the
130 | public may access the material from a place and at a time
131 | individually chosen by them.
132 |
133 | l. Sui Generis Database Rights means rights other than copyright
134 | resulting from Directive 96/9/EC of the European Parliament and of
135 | the Council of 11 March 1996 on the legal protection of databases,
136 | as amended and/or succeeded, as well as other essentially
137 | equivalent rights anywhere in the world.
138 |
139 | m. You means the individual or entity exercising the Licensed Rights
140 | under this Public License. Your has a corresponding meaning.
141 |
142 |
143 | Section 2 -- Scope.
144 |
145 | a. License grant.
146 |
147 | 1. Subject to the terms and conditions of this Public License,
148 | the Licensor hereby grants You a worldwide, royalty-free,
149 | non-sublicensable, non-exclusive, irrevocable license to
150 | exercise the Licensed Rights in the Licensed Material to:
151 |
152 | a. reproduce and Share the Licensed Material, in whole or
153 | in part; and
154 |
155 | b. produce, reproduce, and Share Adapted Material.
156 |
157 | 2. Exceptions and Limitations. For the avoidance of doubt, where
158 | Exceptions and Limitations apply to Your use, this Public
159 | License does not apply, and You do not need to comply with
160 | its terms and conditions.
161 |
162 | 3. Term. The term of this Public License is specified in Section
163 | 6(a).
164 |
165 | 4. Media and formats; technical modifications allowed. The
166 | Licensor authorizes You to exercise the Licensed Rights in
167 | all media and formats whether now known or hereafter created,
168 | and to make technical modifications necessary to do so. The
169 | Licensor waives and/or agrees not to assert any right or
170 | authority to forbid You from making technical modifications
171 | necessary to exercise the Licensed Rights, including
172 | technical modifications necessary to circumvent Effective
173 | Technological Measures. For purposes of this Public License,
174 | simply making modifications authorized by this Section 2(a)
175 | (4) never produces Adapted Material.
176 |
177 | 5. Downstream recipients.
178 |
179 | a. Offer from the Licensor -- Licensed Material. Every
180 | recipient of the Licensed Material automatically
181 | receives an offer from the Licensor to exercise the
182 | Licensed Rights under the terms and conditions of this
183 | Public License.
184 |
185 | b. Additional offer from the Licensor -- Adapted Material.
186 | Every recipient of Adapted Material from You
187 | automatically receives an offer from the Licensor to
188 | exercise the Licensed Rights in the Adapted Material
189 | under the conditions of the Adapter's License You apply.
190 |
191 | c. No downstream restrictions. You may not offer or impose
192 | any additional or different terms or conditions on, or
193 | apply any Effective Technological Measures to, the
194 | Licensed Material if doing so restricts exercise of the
195 | Licensed Rights by any recipient of the Licensed
196 | Material.
197 |
198 | 6. No endorsement. Nothing in this Public License constitutes or
199 | may be construed as permission to assert or imply that You
200 | are, or that Your use of the Licensed Material is, connected
201 | with, or sponsored, endorsed, or granted official status by,
202 | the Licensor or others designated to receive attribution as
203 | provided in Section 3(a)(1)(A)(i).
204 |
205 | b. Other rights.
206 |
207 | 1. Moral rights, such as the right of integrity, are not
208 | licensed under this Public License, nor are publicity,
209 | privacy, and/or other similar personality rights; however, to
210 | the extent possible, the Licensor waives and/or agrees not to
211 | assert any such rights held by the Licensor to the limited
212 | extent necessary to allow You to exercise the Licensed
213 | Rights, but not otherwise.
214 |
215 | 2. Patent and trademark rights are not licensed under this
216 | Public License.
217 |
218 | 3. To the extent possible, the Licensor waives any right to
219 | collect royalties from You for the exercise of the Licensed
220 | Rights, whether directly or through a collecting society
221 | under any voluntary or waivable statutory or compulsory
222 | licensing scheme. In all other cases the Licensor expressly
223 | reserves any right to collect such royalties.
224 |
225 |
226 | Section 3 -- License Conditions.
227 |
228 | Your exercise of the Licensed Rights is expressly made subject to the
229 | following conditions.
230 |
231 | a. Attribution.
232 |
233 | 1. If You Share the Licensed Material (including in modified
234 | form), You must:
235 |
236 | a. retain the following if it is supplied by the Licensor
237 | with the Licensed Material:
238 |
239 | i. identification of the creator(s) of the Licensed
240 | Material and any others designated to receive
241 | attribution, in any reasonable manner requested by
242 | the Licensor (including by pseudonym if
243 | designated);
244 |
245 | ii. a copyright notice;
246 |
247 | iii. a notice that refers to this Public License;
248 |
249 | iv. a notice that refers to the disclaimer of
250 | warranties;
251 |
252 | v. a URI or hyperlink to the Licensed Material to the
253 | extent reasonably practicable;
254 |
255 | b. indicate if You modified the Licensed Material and
256 | retain an indication of any previous modifications; and
257 |
258 | c. indicate the Licensed Material is licensed under this
259 | Public License, and include the text of, or the URI or
260 | hyperlink to, this Public License.
261 |
262 | 2. You may satisfy the conditions in Section 3(a)(1) in any
263 | reasonable manner based on the medium, means, and context in
264 | which You Share the Licensed Material. For example, it may be
265 | reasonable to satisfy the conditions by providing a URI or
266 | hyperlink to a resource that includes the required
267 | information.
268 |
269 | 3. If requested by the Licensor, You must remove any of the
270 | information required by Section 3(a)(1)(A) to the extent
271 | reasonably practicable.
272 |
273 | b. ShareAlike.
274 |
275 | In addition to the conditions in Section 3(a), if You Share
276 | Adapted Material You produce, the following conditions also apply.
277 |
278 | 1. The Adapter's License You apply must be a Creative Commons
279 | license with the same License Elements, this version or
280 | later, or a BY-SA Compatible License.
281 |
282 | 2. You must include the text of, or the URI or hyperlink to, the
283 | Adapter's License You apply. You may satisfy this condition
284 | in any reasonable manner based on the medium, means, and
285 | context in which You Share Adapted Material.
286 |
287 | 3. You may not offer or impose any additional or different terms
288 | or conditions on, or apply any Effective Technological
289 | Measures to, Adapted Material that restrict exercise of the
290 | rights granted under the Adapter's License You apply.
291 |
292 |
293 | Section 4 -- Sui Generis Database Rights.
294 |
295 | Where the Licensed Rights include Sui Generis Database Rights that
296 | apply to Your use of the Licensed Material:
297 |
298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
299 | to extract, reuse, reproduce, and Share all or a substantial
300 | portion of the contents of the database;
301 |
302 | b. if You include all or a substantial portion of the database
303 | contents in a database in which You have Sui Generis Database
304 | Rights, then the database in which You have Sui Generis Database
305 | Rights (but not its individual contents) is Adapted Material,
306 |
307 | including for purposes of Section 3(b); and
308 | c. You must comply with the conditions in Section 3(a) if You Share
309 | all or a substantial portion of the contents of the database.
310 |
311 | For the avoidance of doubt, this Section 4 supplements and does not
312 | replace Your obligations under this Public License where the Licensed
313 | Rights include other Copyright and Similar Rights.
314 |
315 |
316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
317 |
318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
328 |
329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
338 |
339 | c. The disclaimer of warranties and limitation of liability provided
340 | above shall be interpreted in a manner that, to the extent
341 | possible, most closely approximates an absolute disclaimer and
342 | waiver of all liability.
343 |
344 |
345 | Section 6 -- Term and Termination.
346 |
347 | a. This Public License applies for the term of the Copyright and
348 | Similar Rights licensed here. However, if You fail to comply with
349 | this Public License, then Your rights under this Public License
350 | terminate automatically.
351 |
352 | b. Where Your right to use the Licensed Material has terminated under
353 | Section 6(a), it reinstates:
354 |
355 | 1. automatically as of the date the violation is cured, provided
356 | it is cured within 30 days of Your discovery of the
357 | violation; or
358 |
359 | 2. upon express reinstatement by the Licensor.
360 |
361 | For the avoidance of doubt, this Section 6(b) does not affect any
362 | right the Licensor may have to seek remedies for Your violations
363 | of this Public License.
364 |
365 | c. For the avoidance of doubt, the Licensor may also offer the
366 | Licensed Material under separate terms or conditions or stop
367 | distributing the Licensed Material at any time; however, doing so
368 | will not terminate this Public License.
369 |
370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
371 | License.
372 |
373 |
374 | Section 7 -- Other Terms and Conditions.
375 |
376 | a. The Licensor shall not be bound by any additional or different
377 | terms or conditions communicated by You unless expressly agreed.
378 |
379 | b. Any arrangements, understandings, or agreements regarding the
380 | Licensed Material not stated herein are separate from and
381 | independent of the terms and conditions of this Public License.
382 |
383 |
384 | Section 8 -- Interpretation.
385 |
386 | a. For the avoidance of doubt, this Public License does not, and
387 | shall not be interpreted to, reduce, limit, restrict, or impose
388 | conditions on any use of the Licensed Material that could lawfully
389 | be made without permission under this Public License.
390 |
391 | b. To the extent possible, if any provision of this Public License is
392 | deemed unenforceable, it shall be automatically reformed to the
393 | minimum extent necessary to make it enforceable. If the provision
394 | cannot be reformed, it shall be severed from this Public License
395 | without affecting the enforceability of the remaining terms and
396 | conditions.
397 |
398 | c. No term or condition of this Public License will be waived and no
399 | failure to comply consented to unless expressly agreed to by the
400 | Licensor.
401 |
402 | d. Nothing in this Public License constitutes or may be interpreted
403 | as a limitation upon, or waiver of, any privileges and immunities
404 | that apply to the Licensor or You, including from the legal
405 | processes of any jurisdiction or authority.
406 |
407 |
408 | =======================================================================
409 |
410 | Creative Commons is not a party to its public
411 | licenses. Notwithstanding, Creative Commons may elect to apply one of
412 | its public licenses to material it publishes and in those instances
413 | will be considered the “Licensor.” The text of the Creative Commons
414 | public licenses is dedicated to the public domain under the CC0 Public
415 | Domain Dedication. Except for the limited purpose of indicating that
416 | material is shared under a Creative Commons public license or as
417 | otherwise permitted by the Creative Commons policies published at
418 | creativecommons.org/policies, Creative Commons does not authorize the
419 | use of the trademark "Creative Commons" or any other trademark or logo
420 | of Creative Commons without its prior written consent including,
421 | without limitation, in connection with any unauthorized modifications
422 | to any of its public licenses or any other arrangements,
423 | understandings, or agreements concerning use of licensed material. For
424 | the avoidance of doubt, this paragraph does not form part of the
425 | public licenses.
426 |
427 | Creative Commons may be contacted at creativecommons.org.
428 |
--------------------------------------------------------------------------------
/security.md:
--------------------------------------------------------------------------------
1 | ## Security Policy
2 |
3 | This project is built on markdown which is used to create binary files , such as `.pdf` and `epub,` and the site itself.
4 | It is not impossible that a malicious actor could somehow embed malware in the markdown or subvert the document creation process.
5 | If you find anything suspicious in either the markdown or pipeline scripts then let us know ASAP and we will fix it as a priority.
6 |
7 | Open a [security advisory][advisory] and this will be provided only to the project's admins and in strict confidence.
8 |
9 | [advisory]: https://github.com/OWASP/www-project-secure-coding-practices-quick-reference-guide/security/advisories/new
10 |
--------------------------------------------------------------------------------
/stable-en/01-introduction/05-introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices
5 | tags: SCP-QRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Introduction
12 |
13 | This technology agnostic document defines a set of general software
14 | security coding practices, in a checklist format, that can be integrated
15 | into the software development lifecycle. Implementation of these
16 | practices will mitigate most common software vulnerabilities.
17 |
18 | Generally, it is much less expensive to build secure software than to
19 | correct security issues after the software package has been completed,
20 | not to mention the costs that may be associated with a security breach.
21 |
22 | Securing critical software resources is more important than ever as the
23 | focus of attackers has steadily moved toward the application layer. A
24 | 2009 SANS study found that attacks against web applications
25 | constitute more than 60% of the total attack attempts observed on the
26 | Internet.
27 |
28 | When utilizing this guide, development teams should start by assessing
29 | the maturity of their secure software development lifecycle and the
30 | knowledge level of their development staff. Since this guide does not
31 | cover the details of how to implement each coding practice, developers
32 | will either need to have the prior knowledge or have sufficient
33 | resources available that provide the necessary guidance. This guide
34 | provides coding practices that can be translated into coding
35 | requirements without the need for the developer to have an in depth
36 | understanding of security vulnerabilities and exploits. However, other
37 | members of the development team should have the responsibility, adequate
38 | training, tools and resources to validate that the design and
39 | implementation of the entire system is secure.
40 |
41 | A glossary of important terms in this document is provided in appendix B.
42 |
43 | Guidance on implementing a secure software development framework is
44 | beyond the scope of this paper, however the following additional general
45 | practices and resources are recommended:
46 |
47 | - Clearly define roles and responsibilities
48 |
49 | - Provide development teams with adequate software security training
50 |
51 | - Implement a secure software development lifecycle
52 |
53 | - Establish secure coding standards
54 |
55 | - [OWASP Development Guide][guide] Project
56 |
57 | - Build a re-usable object library
58 |
59 | - [OWASP Enterprise Security API][esapi] (ESAPI) Project
60 |
61 | - Verify the effectiveness of security controls
62 |
63 | - [OWASP Application Security Verification Standard][asvs] (ASVS) Project
64 |
65 | - Establish secure outsourced development practices including defining
66 | security requirements and verification methodologies in both the
67 | request for proposal (RFP) and contract.
68 |
69 |
70 | [asvs]: https://owasp.org/www-project-application-security-verification-standard/
71 | [esapi]: https://owasp.org/www-project-enterprise-security-api/
72 | [guide]: https://owasp.org/www-project-developer-guide/
73 |
74 | \newpage
75 |
--------------------------------------------------------------------------------
/stable-en/01-introduction/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-en" %}
2 |
--------------------------------------------------------------------------------
/stable-en/02-checklist/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices
5 | tags: SCPQRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Secure Coding Practices Checklist
12 |
13 | 2.1 [Input validation](05-checklist.md#input-validation)
14 |
15 | 2.2 [Output encoding](05-checklist.md#output-encoding)
16 |
17 | 2.3 [Authentication and password management](05-checklist.md#authentication-and-password-management)
18 |
19 | 2.4 [Session management](05-checklist.md#session-management)
20 |
21 | 2.5 [Access control](05-checklist.md#access-control)
22 |
23 | 2.6 [Cryptographic practices](05-checklist.md#cryptographic-practices)
24 |
25 | 2.7 [Error handling and logging](05-checklist.md#error-handling-and-logging)
26 |
27 | 2.8 [Data protection](05-checklist.md#data-protection)
28 |
29 | 2.9 [Communication security](05-checklist.md#communication-security)
30 |
31 | 2.10 [System configuration](05-checklist.md#system-configuration)
32 |
33 | 2.11 [Database security](05-checklist.md#database-security)
34 |
35 | 2.12 [File management](05-checklist.md#file-management)
36 |
37 | 2.13 [Memory management](05-checklist.md#memory-management)
38 |
39 | 2.14 [General coding practices](05-checklist.md#general-coding-practices)
40 |
--------------------------------------------------------------------------------
/stable-en/02-checklist/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-en" %}
2 |
--------------------------------------------------------------------------------
/stable-en/03-appendices/03-overview.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices
5 | tags: SCP-QRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Appendix A: Software Security and Risk Principles Overview
12 |
13 | Building secure software requires a basic understanding of security
14 | principles. While a comprehensive review of security principles is
15 | beyond the scope of this guide, a quick overview is provided.
16 |
17 | The goal of software security is to maintain the
18 | confidentiality, integrity, and availability of information resources in order to
19 | enable successful business operations.
20 | This goal is accomplished through the implementation of security controls.
21 | This guide focuses on the technical controls specific to
22 | mitigating the occurrence of common software vulnerabilities.
23 | While the primary focus is web applications and their supporting infrastructure,
24 | most of the guidance can be applied to any software deployment platform.
25 |
26 | It is helpful to understand what is meant by risk, in order to protect
27 | the business from unacceptable risks associated with its reliance on
28 | software. Risk is a combination of factors that threaten the success of
29 | the business. This can be described conceptually as follows: a threat
30 | agent interacts with a system, which may have a vulnerability that can be
31 | exploited in order to cause an impact. While
32 | this may seem like an abstract concept, think of it this way: a car
33 | burglar (threat agent) goes through a parking lot checking cars (the
34 | system) for unlocked doors (the vulnerability) and when they find one,
35 | they open the door (the exploit) and take whatever is inside (the
36 | impact). All of these factors play a role in secure software
37 | development.
38 |
39 | There is a fundamental difference between the approach taken by a
40 | development team and that taken by someone attacking an application. A
41 | development team typically approaches an application based on what it is
42 | intended to do. In other words, they are designing an application to
43 | perform specific tasks based on documented functional requirements and
44 | use cases. An attacker, on the other hand, is more interested in what an
45 | application can be made to do and operates on the principle that \"any
46 | action not specifically denied, is allowed\". To address this, some
47 | additional elements need to be integrated into the early stages of the
48 | software lifecycle. These new elements are [*security
49 | requirements*](#Security_Requirements) and [*abuse cases*](#Abuse_Case).
50 | This guide is designed to help with identifying high level security
51 | requirements and addressing many common abuse scenarios.
52 |
53 | It is important for web development teams to understand that client side
54 | controls like client based input validation, hidden fields and interface
55 | controls (e.g., pull downs and radio buttons), provide little if any
56 | security benefit. An attacker can use tools like client side web proxies
57 | (e.g. OWASP ZAP, Burp) or network packet capture tools (e.g.,
58 | WireShark) to analyze application traffic and submit custom built
59 | requests, bypassing the interface all together. Additionally, Flash,
60 | Java Applets and other client side objects can be decompiled and
61 | analyzed for flaws.
62 |
63 | Software security flaws can be introduced at any stage of the software
64 | development lifecycle, including:
65 |
66 | - Not identifying security requirements up front
67 |
68 | - Creating conceptual designs that have logic errors
69 |
70 | - Using poor coding practices that introduce technical vulnerabilities
71 |
72 | - Deploying the software improperly
73 |
74 | - Introducing flaws during maintenance or updating
75 |
76 | Furthermore, it is important to understand that software vulnerabilities
77 | can have a scope beyond the software itself. Depending on the nature of
78 | the software, the vulnerability and the supporting infrastructure, the
79 | impacts of a successful exploitation can include compromises to any or
80 | all of the following:
81 |
82 | - The software and its associated information
83 |
84 | - The operating systems of the associated servers
85 |
86 | - The backend database
87 |
88 | - Other applications in a shared environment
89 |
90 | - The user\'s system
91 |
92 | - Other software that the user interacts with
93 |
94 | \newpage
95 |
--------------------------------------------------------------------------------
/stable-en/03-appendices/05-glossary.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices
5 | tags: SCP-QRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Appendix B: Glossary
12 |
13 | **Abuse case:** Describes the intentional and
14 | unintentional misuses of the software. Abuse cases should challenge the
15 | assumptions of the system design.
16 |
17 | **Access control:** A set of controls that grant or deny a user, or
18 | other entity, access to a system resource. This is usually based on
19 | hierarchical roles and individual privileges within a role, but also
20 | includes system to system interactions.
21 |
22 | **Account disabling:** Account disabling after an established number of invalid
23 | login attempts (e.g., five attempts is common). The account must
24 | be disabled for a period of time sufficient to discourage brute
25 | force guessing of credentials, but not so long as to allow for a
26 | denial-of-service attack to be performed
27 |
28 | **Authentication:** A set of controls that are used to verify the
29 | identity of a user, or other entity, interacting with the software.
30 |
31 | Authentication failure responses should not indicate which part of
32 | the authentication data was incorrect. For example, instead of
33 | \"Invalid username\" or \"Invalid password\", just use \"Invalid
34 | username and/or password\" for both. Error responses must be truly
35 | identical in both display and source code
36 |
37 | **Availability:** A measure of a system\'s accessibility and usability.
38 |
39 | **Calculation errors:** Avoid calculation errors by understanding your programming
40 | language\'s underlying representation and how it interacts with
41 | numeric calculation. Pay close attention to byte size
42 | discrepancies, precision, signed/unsigned distinctions,
43 | truncation, conversion and casting between types, \"not-a-number\"
44 | calculations, and how your language handles numbers that are too
45 | large or too small for its underlying representation
46 |
47 | **Canonicalize:** To reduce various encodings
48 | and representations of data to a single simple form.
49 |
50 | **Communication security:** A set of controls that help ensure the
51 | software handles the sending and receiving of information in a secure
52 | manner.
53 |
54 | **Confidentiality:** To ensure that information is disclosed only to authorized parties.
55 |
56 | **Contextual output encoding:**
57 | Encoding output data based on how it will be utilized by the
58 | application. The specific methods vary depending on the way the output
59 | data is used. If the data is to be included in the response to the
60 | client, account for inclusion scenarios like: the body of an HTML
61 | document, an HTML attribute, within JavaScript, within a CSS or in a URL.
62 | You must also account for other use cases like SQL queries, XML and LDAP.
63 | Consider HTML entity encoding, but this may not work in all cases.
64 |
65 | **Cross Site Request Forgery (CSRF):**
66 | An external website or application forces a client to make an unintended
67 | request to another application that the client has an active session
68 | with. Applications are vulnerable when they use known, or predictable,
69 | URLs and parameters; and when the browser automatically transmits all
70 | required session information with each request to the vulnerable
71 | application.
72 |
73 | **Cryptographic practices:** A set of controls that ensure cryptographic
74 | operations within the application are handled securely.
75 |
76 | **Data protection:** A set of controls that help ensure the software
77 | handles the storing of information in a secure manner.
78 |
79 | **Database security:** A set of controls that ensure that software
80 | interacts with a database in a secure manner and that the database is
81 | configured securely.
82 |
83 | **Error handling and logging:** A set of practices that ensure the
84 | application handles errors safely and conducts proper event logging.
85 |
86 | **Exploit:** To take advantage of a vulnerability.
87 | Typically this is an intentional action designed to compromise the
88 | software\'s security controls by leveraging a vulnerability.
89 |
90 | **File management:** A set of controls that cover the interaction
91 | between the code and other system files.
92 |
93 | **General coding practices:** A set of controls that cover coding
94 | practices that do not fit easily into other categories.
95 |
96 | **Hazardous character:** Any character
97 | or encoded representation of a character that can effect the intended
98 | operation of the application or associated system by being interpreted
99 | to have a special meaning, outside the intended use of the character.
100 | These characters may be used to:
101 |
102 | * Altering the structure of existing code or statements
103 | * Inserting new unintended code
104 | * Altering paths
105 | * Causing unexpected outcomes from program functions or routines
106 | * Causing error conditions
107 | * Compromise downstream applications or systems
108 |
109 | If any potentially hazardous characters
110 | must be allowed as input, be sure that you implement additional
111 | controls like output encoding, secure task specific APIs and
112 | accounting for the utilization of that data throughout the
113 | application . Examples of common hazardous characters include:
114 | > \< \> \" \' % ( ) & + \\ \\\' \\\"
115 |
116 | * Check for new line characters (%0d, %0a, \\r, \\n)
117 | * Check for "dot-dot-slash\" (../ or ..\\) path alterations
118 | characters. In cases where UTF-8 extended character set
119 | encoding is supported, address alternate representation like:
120 | %c0%ae%c0%ae/
121 |
122 | **HTML eEntity encode:** The process of
123 | replacing certain ASCII characters with their HTML entity equivalents.
124 | For example, encoding would replace the less than character \"\<\" with
125 | the HTML equivalent \"<\". HTML entities are \'inert\' in most
126 | interpreters, especially browsers, which can mitigate certain client
127 | side attacks.
128 |
129 | **Impact:** A measure of the negative effect to the
130 | business that results from the occurrence of an undesired event; what
131 | would be the result of a vulnerability being exploited.
132 |
133 | **Input validation:** A set of controls that verify the properties of
134 | all input data matches what is expected by the application including
135 | types, lengths, ranges, acceptable character sets and does not include
136 | known hazardous characters.
137 |
138 | **Integrity:** The assurance that information is
139 | accurate, complete and valid, and has not been altered by an
140 | unauthorized action.
141 |
142 | **Log event data:** This should include the following:
143 |
144 | 1. Time stamp from a trusted system component
145 | 2. Severity rating for each event
146 | 3. Tagging of security relevant events, if they are mixed with other log entries
147 | 4. Identity of the account/user that caused the event
148 | 5. Source IP address associated with the request
149 | 6. Event outcome (success or failure)
150 | 7. Description of the event
151 |
152 | Implement monitoring to identify attacks against multiple user
153 | accounts, utilizing the same password. This attack pattern is used
154 | to bypass standard lockouts, when user IDs can be harvested or
155 | guessed.
156 |
157 | **Memory management:** A set of controls that address memory and buffer usage.
158 |
159 | **Mitigate:** Steps taken to reduce the severity of
160 | a vulnerability. These can include removing a vulnerability, making a
161 | vulnerability more difficult to exploit, or reducing the negative impact
162 | of a successful exploitation.
163 |
164 | **Multi-Factor Authentication (MFA):** An authentication process that requires
165 | the user to produce multiple distinct types of credentials.
166 | Typically this is based on something:
167 |
168 | * they have, for example a mobile/cell phone
169 | * something they know, for example a PIN
170 | * something they are, for example data from a biometric reader
171 |
172 | **Output encoding:** A set of controls addressing the use of encoding to
173 | ensure data output by the application is safe.
174 |
175 | **Parameterized queries / prepared statements:**
176 | Keeps the query and data separate through the use of
177 | placeholders. The query structure is defined with place holders, the SQL
178 | statement is sent to the database and prepared, and then the prepared
179 | statement is combined with the parameter values. The prevents the query
180 | from being altered, because the parameter values are combined with the
181 | compiled statement, not a SQL string.
182 |
183 | **Password complexity**: Password complexity requirements established by policy or
184 | regulation. Authentication credentials should be sufficient to
185 | withstand attacks that are typical of the threats in the deployed
186 | environment. (e.g., requiring the use of alphabetic as well as
187 | numeric and/or special characters).
188 |
189 | **Password length:** Password length requirements established by policy or
190 | regulation. Eight characters is commonly used, but 16 is better or
191 | consider the use of multi-word pass phrases
192 |
193 | **Persistent logins**: Disallow persistent logins and enforce periodic session
194 | terminations, even when the session is active. Especially for
195 | applications supporting rich network connections or connecting to
196 | critical systems. Termination times should support business
197 | requirements and the user should receive sufficient notification
198 | to mitigate negative impacts
199 |
200 | **Safe updates:** Method of updating the application from trusted sources.
201 | If the application utilizes automatic
202 | updates, then use cryptographic signatures for your code and
203 | ensure your download clients verify those signatures. Use
204 | encrypted channels to transfer the code from the host server
205 |
206 | **Sanitize data:** The process of making
207 | potentially harmful data safe through the use of data removal,
208 | replacement, encoding or escaping of the characters.
209 |
210 | **Security controls:** An action that
211 | mitigates a potential vulnerability and helps ensure that the software
212 | behaves only in the expected manner.
213 |
214 | **Security requirements:** A set of
215 | design and functional requirements that help ensure the software is
216 | built and deployed in a secure manner.
217 |
218 | **Sequential authentication:**
219 | When authentication data is requested on successive pages rather than
220 | being requested all at once on a single page.
221 |
222 | **Session management:** A set of controls that help ensure web
223 | applications handle HTTP sessions in a secure manner.
224 |
225 | Do not expose session identifiers in URLs, error messages or logs.
226 | Session identifiers should only be located in the HTTP cookie
227 | header. For example, do not pass session identifiers as GET
228 | parameters
229 |
230 | **State data:** When data or parameters are used,
231 | by the application or server, to emulate a persistent connection or
232 | track a client\'s status across a multi-request process or transaction.
233 |
234 | **System:** A generic term covering the operating
235 | systems, web server, application frameworks and related infrastructure.
236 |
237 | **System configuration:** A set of controls that help ensure the
238 | infrastructure components supporting the software are deployed securely.
239 |
240 | **Threat Agent:** Any entity which may have a
241 | negative impact on the system. This may be a malicious user who wants to
242 | compromise the system\'s security controls; however, it could also be an
243 | accidental misuse of the system or a more physical threat like fire or
244 | flood.
245 |
246 | **Trust boundaries:** Typically a trust
247 | boundary constitutes the components of the system under your direct
248 | control. All connections and data from systems outside of your direct
249 | control, including all clients and systems managed by other parties,
250 | should be consider untrusted and be validated at the boundary before
251 | allowing further system interaction.
252 |
253 | **Vulnerability:** A weakness that makes the system susceptible to attack or damage.
254 |
255 | \newpage
256 |
--------------------------------------------------------------------------------
/stable-en/03-appendices/07-references.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices
5 | tags: SCP-QRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Appendix C: External References
12 |
13 | ## Cited References
14 |
15 | - SANS CIS Controls version 8
16 |
17 | >
18 |
19 | - Web Application Security Consortium
20 |
21 | >
22 |
23 | - Common Weakness Enumeration (CWE)
24 |
25 | >
26 |
27 | - CERT Secure Coding
28 |
29 | >
30 |
31 | - MSDN Security Developer Center
32 |
33 | >
34 |
35 |
36 | ## Security Advisory Sites
37 |
38 | Useful resources to check for known vulnerabilities against supporting
39 | infrastructure and frameworks
40 |
41 | > Secunia Citrix Vulnerability List:
42 |
43 | -
44 |
45 | > Common Vulnerability Enumeration:
46 |
47 | -
48 |
--------------------------------------------------------------------------------
/stable-en/03-appendices/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices
5 | tags: SCPQRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ### Appendix A. [Overview](03-overview.md)
12 |
13 | ### Appendix B. [Glossary](05-glossary.md)
14 |
15 | ### Appendix C. [External References](07-references.md)
16 |
--------------------------------------------------------------------------------
/stable-en/03-appendices/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-en" %}
2 |
--------------------------------------------------------------------------------
/stable-en/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Secure Coding Practices
5 | tags: SCPQRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ## Table of Contents
12 |
13 | ### 1. [Introduction](01-introduction/05-introduction.md)
14 |
15 | ### 2. [Checklist](02-checklist/05-checklist.md)
16 |
17 | ### Appendix A. [Overview](03-appendices/03-overview.md)
18 |
19 | ### Appendix B. [Glossary](03-appendices/05-glossary.md)
20 |
21 | ### Appendix C. [External References](03-appendices/07-references.md)
22 |
--------------------------------------------------------------------------------
/stable-en/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-en" %}
2 |
--------------------------------------------------------------------------------
/stable-en/title.pdf.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | lang: en-US
3 | author: Open Worldwide Application Security Project (OWASP)
4 | version: Stable
5 | date: February 2023 onwards
6 | rights: Creative Commons Attribution ShareAlike 4.0 International (CC BY-SA 4.0)
7 | geometry: "left=3cm,right=2.5cm,top=2cm,bottom=2cm"
8 | header-includes: |
9 | \usepackage{fancyhdr}
10 | \pagestyle{fancy}
11 | \fancyhead{}
12 | \fancyhead[RE,RO]{February 2023 onwards}
13 | \fancyfoot{}
14 | \fancyfoot[LE,LO]{Stable version}
15 | \fancyfoot[RE,RO]{\thepage}
16 | ...
17 |
--------------------------------------------------------------------------------
/stable-en/title.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | lang: en-US
3 | title:
4 | - type: main
5 | text: Secure Coding Practices
6 | - type: subtitle
7 | text: Quick Reference Guide
8 | creator:
9 | - role: author
10 | text: Open Worldwide Application Security Project (OWASP)
11 | - role: editor
12 | text: Keith Turpin
13 | version: Stable
14 | date: February 2023 onwards
15 | rights: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
16 | ...
17 |
--------------------------------------------------------------------------------
/stable-es/01-introduction/05-introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Prácticas de Codificación Segura
5 | tags: SCP-QRG
6 | document: Prácticas de Codificación Segura - Guía rápida de referencia
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Prácticas de Codificación Segura OWASP
12 |
13 | ## Guía rápida de referencia
14 |
15 | ## Introducción
16 |
17 | El presente documento define un conjunto de prácticas comunes de
18 | codificación de software, tecnológicamente agnósticas, en formato de
19 | lista de verificación con el fin de ser integrado al ciclo de
20 | desarrollo. La implementación de estas prácticas mitiga las
21 | vulnerabilidades más comunes del software.
22 |
23 | En términos generales, es mucho menos costoso construir software seguro
24 | que corregir problemas de seguridad cuando ha sido completado, sin
25 | mencionar los costos que pueden estar asociados a un brecha de seguridad.
26 |
27 | Asegurar recursos críticos de software se ha vuelto más importante que
28 | nunca debido a que el foco de los atacantes se ha desplazado hacia la
29 | capa de aplicación. Un estudio en 2009 de la SANS determinó que los
30 | ataques contra aplicaciones web constituyen más del 60% del total de
31 | intentos de ataque observados en la Internet.
32 |
33 | Utilizando la presente guía, el equipo de desarrollo debería comenzar
34 | evaluando el grado de madurez de su ciclo de desarrollo de software
35 | desde el punto de vista de la seguridad, así como el nivel de
36 | conocimiento de sus miembros. Dado que esta guía no cubre los detalles
37 | de implementación de las prácticas de codificación, los desarrolladores
38 | deben poseer previamente los conocimientos suficientes o bien tener
39 | disponibles recursos que los guíen. Esta guía provee prácticas de
40 | codificación que pueden ser traducidas en requerimientos de codificación sin
41 | la necesidad que el desarrollador posea un entendimiento profundo de
42 | vulnerabilidades de seguridad y exploits. Sin embargo, otros miembros
43 | del equipo de desarrollo deberían de poseer el entrenamiento adecuado,
44 | recursos y herramientas para ser responsables y validar que el diseño e
45 | implementación del sistema es seguro.
46 |
47 | En el apéndice B se presenta un glosario de los términos más importantes
48 | utilizados en este documento, incluyendo los cabezales de sección y las
49 | palabras resaltadas con *itálicas*.
50 |
51 | Se encuentra fuera del alcance de este documento la información
52 | detallada de cómo implementar un proceso de desarrollo de software
53 | seguro, sin embargo, se recomiendan las siguientes prácticas y recursos:
54 |
55 | - Definir claramente roles y responsabilidades.
56 |
57 | - Proveer al equipo de desarrollo capacitación suficiente en el área
58 | de seguridad del software.
59 |
60 | - Implementar un ciclo de desarrollo de software seguro.
61 |
62 | - Establecer estándares de codificación segura.
63 |
64 | - [OWASP Development Guide (inglés)][guide] Proyecto
65 |
66 | - Construir una biblioteca de objetos reutilizable.
67 |
68 | - [OWASP Enterprise Security API (inglés)][esapi] Proyecto ESAPI
69 |
70 | - Verificar la efectividad de los controles de seguridad.
71 |
72 | - [Estándar de Verificación de Seguridad en Aplicaciones de OWASP][asvs] Proyecto ASVS
73 |
74 | - Establecer prácticas de seguridad por fuera del ciclo de desarrollo,
75 | incluyendo requerimientos de seguridad y metodologías de
76 | verificación tanto en los request for proposal (RFP) como en los
77 | contratos.
78 |
79 | **Sobre esta versión en español**
80 |
81 | Esta versión de la Guía de referencia rápida en español ha sido
82 | desarrollada como parte de las actividades del capítulo OWASP Uruguay
83 | para la comunidad de desarrolladores y seguridad informática de habla
84 | hispana.
85 |
86 | Participaron de esta traducción:
87 |
88 | * Canedo,Gerardo
89 |
90 | **Copyright y Licencia**
91 |
92 | Copyright © 2010-2023 The OWASP Foundation.
93 |
94 | Este documento se encuentra bajo la licencia
95 | Creative Commons Attribution Share Alike 4.0 International [(CC BY-SA 4.0)][CC-BY-SA-4.0].
96 | Para cualquier reutilización o distribución, debe de indicar claramente los términos de la licencia del presente trabajo.
97 |
98 | [CC-BY-SA-4.0]: https://creativecommons.org/licenses/by-sa/4.0/deed.es_ES
99 |
100 | [asvs]: https://owasp.org/www-project-application-security-verification-standard/
101 | [esapi]: https://owasp.org/www-project-enterprise-security-api/
102 | [guide]: https://owasp.org/www-project-developer-guide/
103 |
104 | \newpage
105 |
--------------------------------------------------------------------------------
/stable-es/01-introduction/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-es" %}
2 |
--------------------------------------------------------------------------------
/stable-es/02-checklist/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Prácticas de Codificación Segura
5 | tags: SCPQRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Lista de Verificación de Prácticas de Codificación Segura
12 |
13 | 2.1 [Validación de entradas](05-checklist.md#input-validation)
14 |
15 | 2.2 [Validación de entradas](05-checklist.md#output-encoding)
16 |
17 | 2.3 [Gestión de autenticación y contraseñas](05-checklist.md#authentication-and-password-management)
18 |
19 | 2.4 [Gestión de sesiones](05-checklist.md#session-management)
20 |
21 | 2.5 [Control de acceso](05-checklist.md#access-control)
22 |
23 | 2.6 [Prácticas critpográficas](05-checklist.md#cryptographic-practices)
24 |
25 | 2.7 [Gestión de errores y registros (logs)](05-checklist.md#error-handling-and-logging)
26 |
27 | 2.8 [Protección de datos](05-checklist.md#data-protection)
28 |
29 | 2.9 [Seguridad en las comunicaciones](05-checklist.md#communication-security)
30 |
31 | 2.10 [Configuración de los sistemas](05-checklist.md#system-configuration)
32 |
33 | 2.11 [Seguridad de Base de Datos](05-checklist.md#database-security)
34 |
35 | 2.12 [Gestión de Archivos](05-checklist.md#file-management)
36 |
37 | 2.13 [Gestión de Memoria](05-checklist.md#memory-management)
38 |
39 | 2.14 [Practicas Generales para la Codificación](05-checklist.md#general-coding-practices)
40 |
--------------------------------------------------------------------------------
/stable-es/02-checklist/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-es" %}
2 |
--------------------------------------------------------------------------------
/stable-es/03-appendices/03-overview.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Prácticas de Codificación Segura
5 | tags: SCP-QRG
6 | document: Prácticas de Codificación Segura - Guía rápida de referencia
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Apéndice A: Visión General de la Seguridad en el Software y sus Principales Riesgos
12 |
13 | La construcción de software seguro requiere una comprensión básica de
14 | los principios de seguridad. Si bien escapa al objetivo de esta guía una
15 | revisión exhaustiva de estos, se proporciona una visión general de los mismos.
16 |
17 | La meta de la seguridad en el software es el de mantener la
18 | confidencialidad, integridad y disponibilidad de los activos de información de
19 | modo de permitir el desarrollo exitoso de las operaciones del negocios. Esta
20 | meta se consigue con la implementación de controles de seguridad.
21 | La presente guía pone foco en los controles técnicos específicos para
22 | mitigar la ocurrencia de vulnerabilidades frecuentes en el software.
23 | Si bien el foco principal está en las aplicaciones web y la infraestructura que las soporta,
24 | la mayoría de los lineamientos pueden aplicarse en cualquier plataforma de desarrollo de software.
25 |
26 | Es de gran utilidad comprender qué se entiende por riesgo, con el fin
27 | de proteger al negocio de riesgos inaceptables derivados de su
28 | dependencia con el software. Un riesgo es una combinación de factores que
29 | amenazan el correcto funcionamiento del negocio.
30 | Puede ser definido conceptualmente como: un agente amenazante
31 | que interactúa con el sistema, que puede tener una
32 | vulnerabilidad a ser explotada de forma de generar un impacto.
33 | Si bien este puede resultar un concepto abstracto,
34 | se lo puede pensar de esta forma:
35 | un ladrón de autos (agente amenazante) recorre un estacionamiento verificando
36 | los vehículos (el sistema) en busca de una puerta sin trabar (la vulnerabilidad) y,
37 | cuando encuentra una, la abre (explotación) y toma algo de dentro del mismo (el impacto).
38 | Todos estos factores juegan un rol en el desarrollo de software seguro.
39 |
40 | Existe una diferencia fundamental entre el enfoque que adopta un equipo
41 | de desarrollo y el que toma alguien que está atacando la aplicación. Un equipo
42 | de desarrollo adopta un enfoque basado en lo que tiene intenciones que el sistema realice.
43 | En otras palabras, están diseñando una aplicación para que realice tareas
44 | específicas basándose en los requerimientos funcionales y casos de uso que han
45 | sido documentados. Un atacante, por otra parte, está más interesado en lo que
46 | puede llegar a hacerse con la aplicación en cuestión y opera bajo el principio
47 | de \"cualquier acción que no haya sido denegada de forma expresa, está permitida\".
48 | Para hacer frente a esto, se deben integrar algunos elementos adicionales en
49 | las etapas tempranas del ciclo de desarrollo de software. Estos nuevos elementos
50 | son los requerimientos de seguridad y los
51 | casos de abuso. Esta guía fue creada para ayudar a identificar
52 | requerimientos de seguridad de alto nivel y hacer frente a muchos escenarios de
53 | abuso comunes.
54 |
55 | Es importante que los equipos de desarrollo web entiendan que los
56 | controles implementados en el cliente, tales como la validación de entrada de
57 | datos, campos ocultos y controles en la interfaz (por ejemplo: menús desplegables
58 | y botones de opción) brindan poco o nulo beneficio desde el punto de vista de
59 | la seguridad. Un atacante puede utilizar herramientas tales como proxies del
60 | lado del cliente (por ejemplo: OWASP ZAP o Burp) o herramientas de capturas de
61 | paquetes de red (como WireShark) para analizar el tráfico de la aplicación y
62 | enviar solitudes hechas a medida, sin siquiera pasar por la interfaz. Además,
63 | Applets de Java, programas Flash y otros objetos de ejecución del lado del
64 | cliente pueden ser descompilados y analizados en busca de fallas.
65 |
66 | Las fallas de seguridad en el software pueden introducirse en cualquiera
67 | de las etapas del ciclo de desarrollo del software, pudiendo:
68 |
69 | - No identificar requerimientos de seguridad desde el inicio.
70 |
71 | - Crear diseños conceptuales que contengan errores en la lógica.
72 |
73 | - Utilizar prácticas débiles de codificación que introduzcan vulnerabilidades
74 | técnicas.
75 |
76 | - Implantación del software de forma inapropiada.
77 |
78 | - Introducción de fallas durante el mantenimiento o actualización del producto.
79 |
80 | Es importante además entender que las vulnerabilidades del software
81 | pueden escapar los límites del software mismo. Dependiendo de la naturaleza del
82 | software, la vulnerabilidad y la infraestructura que le da soporte, el impacto
83 | del éxito en la explotación puede comprometer a una o todas las siguientes:
84 |
85 | - El software y su información asociada.
86 |
87 | - Los sistemas operativos de los servidores que le dan soporte.
88 |
89 | - La base de datos del backend.
90 |
91 | - Otras aplicaciones en el entorno compartido.
92 |
93 | - El sistema informático del usuario final.
94 |
95 | - Otro software con el que interactúe el usuario.
96 |
97 | \newpage
98 |
--------------------------------------------------------------------------------
/stable-es/03-appendices/05-glossary.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Prácticas de Codificación Segura
5 | tags: SCP-QRG
6 | document: Prácticas de Codificación Segura - Guía rápida de referencia
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ## Apéndice B: Glosario
12 |
13 | **Agente de Amenaza:**
14 | Cualquier entidad que puede poseer un impacto negativo en el sistema.
15 | Puede ser desde un usuario malicioso que desea comprometer los controles de seguridad del sistema;
16 | sin embargo, también puede referirse al mal uso accidental del
17 | sistema o a una amenaza física como fuego o inundación.
18 |
19 | **Autenticación:** Conjunto de Controles utilizados para verificar la
20 | identidad de un usuario o entidad que interactúa con el software.
21 |
22 | **Autenticación Multi-Factor:** Proceso de autenticación que le requiere al usuario producir múltiples
23 | y distintos tipos de credenciales. Típicamente son basados en:
24 |
25 | > • algo que el usuario tiene, por ejemplo: una tarjeta inteligente
26 | >
27 | > • algo que conoce, por ejemplo: un pin
28 | >
29 | > • o algo que es, por ejemplo: datos provenientes de un lector biométrico
30 |
31 | **Autenticación secuencial:** Cuando los datos de autenticación son solicitados
32 | en páginas sucesivas en vez de ser solicitados todos de una sola vez en una única página.
33 |
34 | **Canonicalizar:** Reducir las distintas
35 | codificaciones y representaciones de datos a una única forma simple.
36 |
37 | **Caracteres considerados peligrosos:**
38 | Cualquier carácter o representación codificada que pueda afectar al
39 | funcionamiento de la aplicación o del sistema asociado al ser interpretado
40 | (comportamiento ajeno al uso previsto del carácter). Estos caracteres pueden
41 | utilizarse para:
42 |
43 | > • Alterar la estructura de las sentencias o código existente.
44 | >
45 | > • Insertar nuevo código no deseado. >
46 | > • Alterar rutas.
47 | >
48 | > • Causar salidas inesperadas de rutinas o funciones.
49 | >
50 | > • Causar condiciones de error.
51 | >
52 | > • Obtener cualquiera de los efectos anteriores sobre el flujo de aplicaciones o sistemas
53 |
54 | **Caso de Abuso:** Describe los usos indebidos
55 | intencionados o no del software. Los casos de abuso deben cuestionar los
56 | supuestos del diseño del sistema.
57 |
58 | **Codificación de Entidades HTML:** Proceso de
59 | sustitución de determinados caracteres ASCII por sus equivalentes en
60 | entidades HTML. Por ejemplo, la codificación sustituiría el carácter menor
61 | \"\<\" por su equivalente en HTML \"<\".
62 | Las entidades HTML son \"inertes\" en la mayoría de los intérpretes,
63 | especialmente en navegadores, por lo que puede mitigar ciertos ataques del lado del cliente.
64 |
65 | **Codificación de Salida:** Conjunto de controles que apuntan al uso de una
66 | codificación para asegurar que los datos producidos por la aplicación son seguros.
67 |
68 | **Codificación de Salida Contextualizada:**
69 | Codificación de los datos de salida en función de cómo serán utilizados
70 | por la aplicación. Los métodos específicos varían en función de la forma en
71 | que se utilizan los datos de salida. Si los datos se van a incluir en la
72 | respuesta al cliente, tenga en cuenta escenarios de inclusión como: el
73 | cuerpo de un documento HTML, un atributo HTML, dentro de JavaScript, dentro
74 | de CSS o en una URL. También debe tener en cuenta otros casos de uso como
75 | consultas SQL, XML y LDAP.
76 |
77 | **Confidencialidad:** Propiedad de la información
78 | por la que se garantiza que está accesible únicamente a entidades autorizadas.
79 |
80 | **Configuración del sistema:** Conjunto de controles que ayuda a asegurar que
81 | los componentes de infraestructura que brindan soporte al software fueron
82 | desplegados de manera segura.
83 |
84 | **Consultas parametrizadas (prepared statements):** Mantiene la consulta
85 | y los datos separados a través del uso de marcadores. La estructura de la
86 | consulta es definida utilizando marcadores, la consulta SQL es enviada a la
87 | base de datos y preparada, para luego ser combinada con los valores de los
88 | parámetros. Esto previene a las consultas de ser alteradas debido a que los
89 | valores de los parámetros son combinados con la consulta compilada, no con
90 | la cadena de caracteres que representa al SQL.
91 |
92 | **Control de Acceso:** Conjunto de controles que permiten o deniegan a un
93 | usuario, u otra entidad, el acceso a un recurso del sistema. Suele basarse
94 | en roles jerárquicos y privilegios individuales dentro de un rol, pero
95 | también incluye las interacciones entre sistemas.
96 |
97 | **Control de seguridad:** Acción que mitiga una
98 | vulnerabilidad potencial y ayuda a asegurar que el software se comporta
99 | únicamente de la forma esperada.
100 |
101 | **Datos de estado:** Cuando son utilizados datos o
102 | parámetros, ya sea por la aplicación o el servidor, emulando una conexión
103 | persiste o realizando el seguimiento del estado de un cliente a través de
104 | un proceso multi-pedido o transacción.
105 |
106 | **Datos de registros (log):** Debe incluir lo siguiente:
107 |
108 | > 1\. Fecha-Hora obtenida de un componente confiable del sistema.
109 | >
110 | > 2\. Nivel de severidad para cada evento
111 | >
112 | > 3\. Etiquetado de eventos relevantes a la seguridad, si se encuentran
113 | > mezclados con otras entradas de la bitácora.
114 | >
115 | > 4\. Identidad de la cuenta/usuario que ha causado el evento.
116 | >
117 | > 5\. Dirección IP del origen asociado con el pedido.
118 | >
119 | > 6\. Resultado del evento (éxito o falla).
120 | >
121 | > 7\. Descripción del evento.
122 |
123 | **Disponibilidad:** Medida de Accesibilidad y Usabilidad del sistema.
124 |
125 | **Exploit:** Forma de tomar ventaja de una vulnerabilidad.
126 | Tipicamente se trata de una acción intencional diseñada para comprometer
127 | los controles de seguridad del software utilizando una vulnerabilidad.
128 |
129 | **Falsificación de petición en sitios cruzados (CSRF):** Una aplicación
130 | externa o sitio web fuerza a un cliente a realizar un pedido a otra
131 | aplicación en la que el cliente posee una sesión activa. Las Aplicaciones
132 | son vulnerables cuando utilizan parámetros o URLs predecibles o conocidas y
133 | cuando el navegador transmite automáticamente toda la información de sesión
134 | con cada pedido a la aplicación vulnerable. (Este ataque es discutido
135 | específicamente en este documento por ser extremadamente común y poco
136 | comprendido).
137 |
138 | **Frontera de Confianza:** Una frontera de
139 | confianza típicamente constituye los componentes del sistema bajo control
140 | directo. Todas las conexiones y datos prevenientes de sistemas fuera del
141 | control directo, incluyendo todos los clientes y sistemas gestionados por
142 | terceros, deben ser considerados no confiables y los datos provenientes de
143 | éstos deben ser validados en la frontera, antes de permitir cualquier
144 | futura interacción con el sistema.
145 |
146 | **Gestión de Archivos:** Conjunto de controles que cubren la interacción
147 | entre el código y otro sistema de archivos.
148 |
149 | **Gestión de memoria:** Conjunto de controles que cubren el uso de buffers y el
150 | direccionamiento de memoria.
151 |
152 | **Gestión de sesión:** Conjunto de controles que ayudan a asegurar que la
153 | aplicación web maneja las sesiones HTTP de forma segura.
154 |
155 | **Impacto:** Medida del efecto negativo en el negocio que
156 | resulta de la ocurrencia de un evento indeseado; pudiendo ser el resultado
157 | la explotación de una vulnerabilidad.
158 |
159 | **Integridad:** La garantía de que la información es
160 | precisa, completa y válida, y no ha sido alterada por una acción no autorizada.
161 |
162 | **Manejo de Errores y Registro en bitácora:** Conjunto de prácticas que
163 | aseguran que las operaciones de manejo de errores y registro de eventos se
164 | gestionan correctamente.
165 |
166 | **Mitigar:** Pasos tomados para reducir la severidad de
167 | una vulnerabilidad. Estos pueden incluir remover una vulnerabilidad, hacer
168 | una vulnerabilidad más difícil de explotar, o reducir el impacto negativo
169 | de una explotación exitosa.
170 |
171 | **Prácticas Criptográficas:** Conjunto de controles que aseguran que las
172 | operaciones de criptografía dentro de la aplicación son manejadas de manera segura.
173 |
174 | **Prácticas de Codificación Generales:** Conjunto de controles que cubren las
175 | prácticas de codificación que no son parte otras categorías.
176 |
177 | **Protección de datos:** Conjunto de controles que asegurar que el software
178 | interactúa con la base de datos de forma segura, además de que la base de
179 | datos se encuentre configurada de forma segura.
180 |
181 | **Requerimiento de Seguridad:** Conjunto de
182 | requerimientos funcionales y de diseño que ayudan a asegurar que el
183 | software se construye y despliega de forma segura.
184 |
185 | **Sanitizar:** El proceso de hacer seguros datos
186 | potencialmente peligrosos a través de la utilización de eliminación,
187 | reemplazo, codificación o \"escapeo\" de los caracteres que lo componen.
188 |
189 | **Seguridad de Base de Datos:** Conjunto de controles que aseguran la
190 | interacción del software con la base de datos de una forma segura y que la
191 | base de datos se encuentra configurada de forma segura.
192 |
193 | **Seguridad en las Comunicaciones:** Conjunto de controles que ayudan a
194 | asegurar que el software maneja de forma segura el envío y la recepción de datos.
195 |
196 | **Sistema:** Término genérico que cubre sistemas operativos,
197 | servidores web, frameworks de aplicaciones y la infraestructura relacionada.
198 |
199 | **Validación de entrada:** Conjunto de controles que verifican que las
200 | propiedades de los datos ingresados coinciden con las esperadas por la
201 | aplicación, incluyendo tipos, largos, rangos, conjuntos de caracteres
202 | aceptados y no se incluyen caracteres peligrosos conocidos.
203 |
204 | **Vulnerabilidad:** Debilidad en un sistema que lo hace susceptible a ataque o daño.
205 |
206 | \newpage
207 |
--------------------------------------------------------------------------------
/stable-es/03-appendices/07-references.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Prácticas de Codificación Segura
5 | tags: SCP-QRG
6 | document: Prácticas de Codificación Segura - Guía rápida de referencia
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # Apéndice C: Referencias externas
12 |
13 | ## Referencias citadas
14 |
15 | - SANS CIS Controls version 8
16 |
17 | >
18 |
19 | - Web Application Security Consortium
20 |
21 | >
22 |
23 | - Common Weakness Enumeration (CWE)
24 |
25 | >
26 |
27 | - CERT Secure Coding
28 |
29 | >
30 |
31 | - MSDN Security Developer Center
32 |
33 | >
34 |
35 | ## Sitios de avisos sobre seguridad
36 |
37 | Fuentes útiles para verificar vulnerabilidades comunes sobre la
38 | infraestructura soporte y frameworks
39 |
40 | > Secunia Citrix Vulnerability List:
41 |
42 | -
43 |
44 | > Common Vulnerability Enumeration:
45 |
46 | -
47 |
--------------------------------------------------------------------------------
/stable-es/03-appendices/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: title: Prácticas de Codificación Segura
5 | tags: SCPQRG
6 | document: OWASP Secure Coding Practices - Quick Reference Guide
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ### Apéndice A. [Visión General](03-overview.md)
12 |
13 | ### Apéndice B. [Glosario](05-glossary.md)
14 |
15 | ### Apéndice C. [Referencias externas](07-references.md)
16 |
--------------------------------------------------------------------------------
/stable-es/03-appendices/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-es" %}
2 |
--------------------------------------------------------------------------------
/stable-es/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: Prácticas de Codificación Segura
5 | tags: SCPQRG
6 | document: Prácticas de Codificación Segura - Guía rápida de referencia
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ## Índice
12 |
13 | ### 1. [Introducción](01-introduction/05-introduction.md)
14 |
15 | ### 2. [Lista de Verificación de Prácticas de Codificación Segura](02-checklist/05-checklist.md)
16 |
17 | ### Apéndice A. [Visión General](03-appendices/03-overview.md)
18 |
19 | ### Apéndice B. [Glosario](03-appendices/05-glossary.md)
20 |
21 | ### Apéndice C. [Referencias externas](03-appendices/07-references.md)
22 |
--------------------------------------------------------------------------------
/stable-es/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-es" %}
2 |
--------------------------------------------------------------------------------
/stable-es/title.pdf.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | lang: es-UY
3 | author: Open Worldwide Application Security Project (OWASP)
4 | version: Stable
5 | date: febrero de 2023
6 | rights: Creative Commons Attribution ShareAlike 4.0 International (CC BY-SA 4.0)
7 | geometry: "left=3cm,right=2.5cm,top=2cm,bottom=2cm"
8 | header-includes: |
9 | \usepackage{fancyhdr}
10 | \pagestyle{fancy}
11 | \fancyhead{}
12 | \fancyhead[RE,RO]{Febrero 2023}
13 | \fancyfoot{}
14 | \fancyfoot[LE,LO]{Versión 2.0.1}
15 | \fancyfoot[RE,RO]{\thepage}
16 | ...
17 |
--------------------------------------------------------------------------------
/stable-es/title.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | lang: es-UY
3 | title:
4 | - type: main
5 | text: Prácticas de codificación segura
6 | - type: subtitle
7 | text: Guía rápida de referencia
8 | creator:
9 | - role: author
10 | text: Open Worldwide Application Security Project (OWASP)
11 | - role: editor
12 | text: Keith Turpin
13 | - role: translator
14 | text: Gerardo Canedo
15 | version: 2.0.1
16 | date: febrero de 2023
17 | rights: Creative Commons Attribution ShareAlike 4.0 International (CC BY-SA 4.0)
18 | ...
19 |
--------------------------------------------------------------------------------
/stable-fa/01-introduction/05-introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: شیوههای کدنویسی امن
5 | tags: SCP-QRG
6 | document: راهنمای شیوههای کدنویسی امن
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # مقدمه
12 |
13 | این سند به صورت بیطرف در تکنولوژیها، مجموعهای از روشهای
14 | کدنویسی امن را در قالب یک چکلیست جمعآوری کرده که میتواند با
15 | چرخه توسعه نرمافزار اقدام شود. پیادهسازی این موارد بسیاری از
16 | آسیبپذیریهای متداول نرمافزار را کاهش میدهد.
17 |
18 | به صورت کلی، تولید یک محصول امن بسیار بهصرفهتر است نسبت به اینکه
19 | محصول به صورت ناامن ایجاد و سپس اصلاحات امنیتی در آن اعمال شود.
20 | مشخص است در صورت رخداد حادثه امنیتی نیز هزینهها چندین برابر خواهد بود.
21 |
22 | ایمنسازی منابع نرمافزاری بیش از پیش حائز اهمیت است چراکه تمرکز نفوذگران
23 | بیشتر در لایهی برنامههای کاربردی است. در سال ۲۰۰۹ مطالعهای از
24 | SANS
25 | نشان داد بیش از ۶۰ درصد حملات مشاهده شده در اینترنت در لایهی برنامهکاربردی هستند.
26 |
27 | هنگام استفاده از این راهنما، تیمهای توسعه باید با ارزیابی
28 | بلوغ چرخه توسعه نرمافزار امن و سطح دانش توسعهدهندگان شروع کنند.
29 | از آنجایی که این راهنما جزئیات نحوه اجرای هر روش کدنویسی را پوشش نمی دهد،
30 | توسعه دهندگان باید دانش قبلی یا منابع کافی در دسترس داشته باشند
31 | که راهنمایی های لازم را ارائه دهد.
32 | این راهنما شیوههای کدنویسی را ارائه میکند که توسعهدهندگان
33 | میتوانند بدون نیاز به درک عمیق از آسیبپذیریها و
34 | سوءاستفادههای امنیتی، به نیازمندیهای کدنویسی ترجمه شوند.
35 | با این حال، سایر اعضای تیم توسعه باید مسئولیت، آموزش کافی، ابزار و منابع
36 | را برای تایید ایمن بودن طراحی و پیادهسازی کل سیستم داشته باشند.
37 |
38 | یک واژهنامه از اصطلاحات مهم در این سند در
39 | پیوست B
40 | ارائه شده است.
41 |
42 | راهنمایی در مورد پیادهسازی یک چارچوب توسعهی امن نرمافزار خارج از دامنهی
43 | این مقاله است، با این حال روشها و منابع عمومی زیر توصیه میشوند:
44 |
45 |
46 | - تعریف نقشها و مسئولیتها به طور واضح
47 |
48 | - ارائه آموزشهای کافی در زمینهی امنیت نرمافزار به تیمهای توسعه
49 |
50 | - پیادهسازی چرخهی توسعهی امن نرمافزار
51 |
52 | - تعیین استانداردهای کدنویسی امن
53 |
54 | - [OWASP Development Guide (انگلیسی)][guide] پروژه
55 |
56 | - ساخت یک کتابخانهی اشیاء قابل استفاده مجدد
57 |
58 | - [OWASP Enterprise Security API (انگلیسی)][esapi] (ESAPI) پروژه
59 |
60 | - بررسی اثربخشی کنترلهای امنیتی
61 |
62 | - [OWASP Application Security Verification Standard (انگلیسی)][asvs] (ASVS) پروژه
63 |
64 | - ایجاد قواعد برونسپاری توسعه به صورت ایمن از جمله تعریف
65 | الزامات امنیتی و روشهای تأیید پروپوزال و قرارداد.
66 |
67 | **درباره این نسخه**
68 |
69 | این نسخه، ترجمهای از نسخه اصلی راهنمای
70 |
71 | مترجم:
72 |
73 | * اشکان رفیعی
74 |
75 |
76 | [asvs]: https://owasp.org/www-project-application-security-verification-standard/
77 | [esapi]: https://owasp.org/www-project-enterprise-security-api/
78 | [guide]: https://owasp.org/www-project-developer-guide/
79 |
80 | \newpage
81 |
--------------------------------------------------------------------------------
/stable-fa/01-introduction/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-fa" %}
2 |
--------------------------------------------------------------------------------
/stable-fa/02-checklist/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: شیوههای کدنویسی امن
5 | tags: SCPQRG
6 | document: راهنمای کدنویسی امن
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # چکلیست شیوههای کدنویسی امن
12 |
13 | 2.1 [اعتبارسنجی ورودیها](05-checklist.md#input-validation)
14 |
15 | 2.2 [انکد کردن خروجیها](05-checklist.md#output-encoding)
16 |
17 | 2.3 [احرازهویت و مدیریت رمزعبور](05-checklist.md#authentication-and-password-management)
18 |
19 | 2.4 [مدیریت نشست](05-checklist.md#session-management)
20 |
21 | 2.5 [کنترل دسترسی](05-checklist.md#access-control)
22 |
23 | 2.6 [شیوههای رمزنگاری](05-checklist.md#cryptographic-practices)
24 |
25 | 2.7 [مدیریت خطا و رویدادنگاری](05-checklist.md#error-handling-and-logging)
26 |
27 | 2.8 [محافظت از اطلاعات](05-checklist.md#data-protection)
28 |
29 | 2.9 [امنیت ارتباطات](05-checklist.md#communication-security)
30 |
31 | 2.10 [پیکربندی سیستم](05-checklist.md#system-configuration)
32 |
33 | 2.11 [امنیت پایگاهداده](05-checklist.md#database-security)
34 |
35 | 2.12 [مدیریت فایل](05-checklist.md#file-management)
36 |
37 | 2.13 [مدیریت حافظه](05-checklist.md#memory-management)
38 |
39 | 2.14 [شیوههای عمومی کدنویسی](05-checklist.md#general-coding-practices)
40 |
--------------------------------------------------------------------------------
/stable-fa/02-checklist/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-en" %}
2 |
--------------------------------------------------------------------------------
/stable-fa/03-appendices/03-overview.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: شیوههای کدنویسی امن
5 | tags: SCP-QRG
6 | document: راهنمای شیوههای کدنویسی امن
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # ضمیمه الف: بررسی اجمالی اصول امنیت نرمافزار و ریسک
12 |
13 | ساخت نرمافزار امن نیازمند درک ابتدایی از اصول امنیتی است.
14 | بررسی جامع اصول امنیتی فراتر از حوزه این راهنما است،
15 | اما یک بررسی اجمالی ارائه شده است.
16 |
17 | هدف از امنیت نرمافزار، حفظ محرمانگی، یکپارچگی، و در دسترس بودن
18 | منابع اطلاعاتی به منظور راهاندازی عملیات تجاری موفق است.
19 | دستیابی به این هدف از طریق پیادهسازی کنترلهای امنیتی صورت میگیرد.
20 | این راهنما بر کنترلهای فنی پیرو کاهش رخداد آسیبپذیریهای رایج نرمافزاری متمرکز است.
21 | در حالی که تمرکز اصلی بر برنامههای وب و زیرساخت آنها است،
22 | اغلب این راهنماییها میتواند در هر پلتفرم نرمافزاری اعمال شود.
23 |
24 | درک معنی ریسک، برای محافظت از کسبوکار در برابر
25 | خطرات غیرقابل قبول ناشی از وابستگی به نرمافزار، مفید است.
26 | ریسک ترکیبی از عواملی است که موفقیت کسبوکار را تهدید میکند.
27 | شرح این موضوع به صورت مفهومی به این گونه است که:
28 | یک عامل تهدید با یک سیستم در ارتباط است که ممکن است دارای آسیبپذیری باشد
29 | و میتواند به منظور تأثیرگذاری، مورد سوء استفاده قرار گیرد.
30 | برای درک بهتر موضوع مثال زیر را در نظر بگیرید:
31 | یک دزد اتومبیل (عامل تهدید) از میان پارکینگها عبور کرده
32 | و اتومبیلها (سیستم) را برای درهای قفل نشده (آسیبپذیری) بررسی میکند
33 | و زمانی که یکی را پیدا میکند، در را باز میکند (استفاده سوء)
34 | و هر آنچه در داخل است را میبرد (تأثیر).
35 | تمام این عوامل نقشی در توسعه نرمافزار امن ایفا میکنند.
36 |
37 | رویکرد تعامل و نگاه نفوذگر اساسا با تیم توسعه متفاوت است.
38 | شیوه نگاه یک تیم توسعه نسبت به برنامهکاربردی اصولا به شکلی است
39 | که برنامهکاربردی برای آن تعبیه شده. به عبارت دیگر آنها برنامه را
40 | بر اساس نیازمندیهای عملیاتی تعریف شده طراحی کرده و توسعه میدهند.
41 | این در حالیست که نفوذگر بیشتر به آنچه یک برنامه قادر است انجام دهد
42 | علاقهمند است و معتقد است هر عملی که به طور خاص منع نشده باشد، مجاز است.
43 | برای حل این مسئله، برخی عناصر اضافی باید در مراحل ابتدایی چرخه
44 | عمر نرمافزار یا مراحل توسعهی آن ادغاک شوند. این عناصر جدید الزامات امنیتی و
45 | موارد سوء استفاده هستند. این راهنما در راستای کمک در شناسایی الزامات امنیتی
46 | سطح بالا و مقابله با بسیاری از سناریوهای متداول سوء استفاده طراحی شده است.
47 |
48 | تیمهای توسعه میبایست آگاه باشند که کنترلهای سمت کاربر نظیر
49 | اعتبارسنجی سمت کاربر، مخفیسازی فیلدها و محدودیتهای رابطکاربری نظیر دکمهها و...
50 | ارزش امنیتی چندانی را ارائه نمیدهند. نفوذگر قادر است از ابزارهای پروکسی وب نظیر
51 | برپسوییت یا ابزارهایی نظیر وایرشارک برای تحلیل ترافیک برنامه و ارسال درخواستهای
52 | دستکاری شده و ساخته شده به صورت سفارشی استفاده کند و از رابطکاربری
53 | به صورت کامل عبور کند. علاوه بر این، اپلتهای جاوا، فلش و سایر اشیاء سمت کاربر
54 | قابل بازبینی و بازگردانی هستند و نقاط ضعف آنها برای نفوذگر قابل تجزیه و تحلیل هست.
55 |
56 |
57 |
58 | نقاط ضعف امنیتی نرمافزار میتواند در هر مرحلهای از چرخهی عمر توسعه نرمافزار
59 | نمایان شود، از جمله:
60 |
61 | - عدم شناسایی نیازمندیهای امنیتی در مراحل ابتدایی
62 |
63 | - ایجاد طرحهای مفهومی که دارای خطاهای منطقی هستند
64 |
65 | - استفاده از روشهای کدنویسی ناکارآمد که منجر به آسیبپذیریهای فنی میشود
66 |
67 | - پیادهسازی نرمافزار به شکل نادرست
68 |
69 | - ایجاد حفرههای امنیتی در زمان نگهداشت یا بهروزرسانی
70 |
71 | علاوه بر این، لازم به ذکر است که آسیبپذیریهای نرمافزار ممکن است دامنهای
72 | فراتر از خود نرمافزار داشته باشند. بسته به ماهیت نرمافزار، آسیبپذیری و
73 | زیرساخت پشتیبان، اثرات بهرهبرداری موفق میتواند شامل مسائل زیر باشد:
74 |
75 | - نرمافزار و اطلاعات مرتبط با آن
76 |
77 | - سیستمعامل سرورهای مربوطه
78 |
79 | - پایگاهداده
80 |
81 | - سایر برنامههایی که در محیط مشترک پیادهسازی شده است
82 |
83 | - سیستم کاربر
84 |
85 | - سایر نرمافزارهایی که کاربر با آنها تعامل دارد
86 |
87 | \newpage
88 |
--------------------------------------------------------------------------------
/stable-fa/03-appendices/05-glossary.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: شیوههای کدنویسی امن
5 | tags: SCP-QRG
6 | document: راهنمای کدنویسی امن
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # پیوست دوم: واژهنامه
12 |
13 | **مورد سوء استفاده:** شرحی از استفادههای عمدی و
14 | غیرعمدی از نرمافزار. موارد سوء استفاده باید
15 | فرضیات طراحی سیستم را به چالش بکشند.
16 |
17 | **کنترل دسترسی:** مجموعهای از کنترلهایی که به کاربر یا
18 | موجودیت دیگر، دسترسی به سیستم را به صورت مجاز یا غیرمجاز میدهند.
19 | این دسترسی معمولا بر اساس نقشهای سلسله مراتبی یا مجوزهای فردی
20 | داخل یک نقش است. این موضوع شامل تعاملات سیستم با سیستم نیز میشود.
21 |
22 | **غیرفعالسازی حساب:** غیرفعالسازی حساب پس از تعداد تلاشهای نامعتبر ورود
23 | به عنوان مثال پنج تلاش معمول است. حساب باید برای مدت زمانی کافی
24 | غیرقابل دسترسی شود تا از حملات جستجوری فراگیر جلوگیری کند
25 | اما این زمان به گونهای باید تنظیم گردد که منجر بخ رخداد
26 | منعسرویس و عدم دسترسپذیری معمول نشود.
27 |
28 | **احرازهویت:** مجموعهای از کنترلها که در راستای تایید هویت
29 | کاربر یا موجودیت دیگری که در تعامل با نرمافزار است استفاده میشود.
30 |
31 | پاسخهای مربوط به احرازهویت ناموفق نباید نشان دهد کدام قسمت از
32 | اطلاعات وارد شده در فرایند احرازهویت نادرست بوده است.
33 | برای مثال به جای پیام نامکاربری نامعتبر یا گذرواژه نامعتبر فقط از
34 | نامکاربری و یا رمزعبور نامعتبر برای هردو استفاده کنید.
35 | پاسخهای خطا باید هم در نمایش و هم در کد واقعا یکسان باشند.
36 |
37 | **دسترسپذیری:** معیاری برای دسترسی و قابلیت استفاده از یک سیستم.
38 |
39 | **خطاهای محاسباتی:** با درک نحوه عملکرد زبان برنامهنویسی و
40 | نحوه تعامل آن با محاسبات عددی، از خطاهای محاسباتی جلوگیری کنید.
41 | به تناقضات در مباحثی همچون دقت به اختلافات اندازه بایت، دقت اندازهگیری،
42 | تمایزهای امضاء دار و بدون امضاء، تبدیل انواع دادهها، محاسبات غیر عددی
43 | و نحوه کارکرد زبانتان با اعدادی که بسیار بزرگ یا کوچک هستند توجه کنید.
44 |
45 | **همنوع کردن یا متعارفسازی:** برای کاهش انواع متعدد و مختلف انکد کردن
46 | و نمایش داده به فرمی ساده و مشترک.
47 |
48 | **امنیت ارتباطات:** مجموعهای از کنترلها که کمک میکند
49 | اطمینان حاصل کنیم نرمافزار ارسال و دریافت
50 | اطلاعات را به شیوهای امن انجام می دهد.
51 |
52 | **محرمانگی:** برای اطمینان از اینکه اطلاعات فقط برای اشخاص مجاز افشاء میشود.
53 |
54 | **انکد کردن دادههای خروجی:**
55 | انکد کردن دادههای خروجی بر اساس نحوه استفاده از آن توسط برنامه.
56 | شیوههای پیادهسازی بر اساس نحوه استفاده از خروجی متفاوت است.
57 | اگر داده قرار است در سمت کاربر نمایش داده شود مثلا در قالب کدهای
58 | HTML, CSS یا Javascript
59 | میتوانید از
60 | HTML entity encoding
61 | استفاده کنید ولی این موضوع در همهی موارد کار نکند.
62 | همچنین لازم است داده و نحوه انکد کردن آن را در کوئریهایی نظیر
63 | SQL و XML و LDAP
64 | در نظر داشته باشید.
65 |
66 | **جعل درخواست میانسایتی (CSRF):**
67 | یک وبسایت یا برنامه خارجی، یک کلاینت را مجبور میکند تا درخواست
68 | ناخواستهای را به برنامه دیگری که در آن نشست فعال دارد، ارسال کند.
69 | زمانی برنامهها به این مورد آسیبپذیر هستند که از آدرسها و پارامترهای
70 | شناخته شده یا قابل پیشبینی استفاده کنند و مکانیزم پیادهسازی شده برای
71 | نشست به گونهای باشد که مرورگر کاربر به صورت خودکار تمامی اطلاعات مربوط به
72 | نشست را در درخواستهای سایت آسیبپذیر ارسال کند. مانند مکانیزم کوکی
73 |
74 | **شیوههای رمزنگاری:** مجموعهای از کنترلها که تضمین میکنند
75 | عملیات رمزنگاری در بنامه به صورت ایمن مدیریت میشوند.
76 |
77 | **محافظت از اطلاعات:** مجموعهای از کنترلها که
78 | کمک میکند از ذخیرهسازی اطلاعات به شیوهای امن
79 | توسط برنامهکاربردی اطمینان حاصل شود.
80 |
81 | **امنیت پایگاهداده:** مجموعهای از کنترلها که اطمینان میدهد
82 | نرمافزار به شیوهای امن با پایگاهداده تعامل دارد و
83 | پایگاهداده به طور امن پیکربندی شده است.
84 |
85 | **مدیریت خطا و رویدادنگاری:** مجموعهای از روشها که اطمینان حاصل میکند
86 | برنامه به طور ایمن خطاها را مدیریت میکند و
87 | ثبت رویدادها به شکل صحیح صورت میگیرد.
88 |
89 | **اکسپلویت:** بهرهبرداری از یک آسیبپذیری است.
90 | به طور معمول این یک اقدام آگاهانه است که طراحی شده تا با بهرهگیری
91 | از یک آسیبپذیری، کنترلهای امنیتی نرمافزار را به خطر بیاندازد.
92 |
93 | **مدیریت فایل:** مجموعهای از کنترلها که تعامل بین کد و
94 | سایر فایلهای سیستم را پوشش میدهد.
95 |
96 | **شیوههای عمومی کدنویسی:** مجموعهای از کنترلها که رویههای کدنویسی
97 | را پوشش میدهند که به راحتی در سایر دستههای دیگر قرار نمیگیرند.
98 |
99 | **کاراکترهای خطرناک:** هرگونه کاراکتر یا نمایش انکد شده از آن
100 | که منجر به اجرای عملیات خاصی خارج از چیزی که برنامه برای آن تعبیه شده است
101 | گردد و تفسیر آن در برنامه باعث رخداد رویهای خارج از قاعده شود.
102 | این کاراکترها ممکن است برای موارد زیر مورد استفاده قرار بگیرند:
103 |
104 | * تغییر ساختار کد یا عبارات موجود
105 | * درج کد جدید و ناخواسته
106 | * تغییر مسیرها
107 | * ایجاد نتایج غیرمنتظره از عملکردها یا روالهای برنامه
108 | * ایجاد خطا
109 | * به خطر انداختن سایر سیستمهای ذیل سرور اصلی
110 |
111 | اگر هریک از کاراکترهای خطرناک باید به عنوان ورودی مجاز باشند،
112 | اطمینان حاصل کنید کنترلهای اضافی مانند انکد کردن خروجی، رابطهای
113 | برنامهنویسی امن و... برای مدیریت شیوه انتقال و تعامل با این کاراکترها
114 | پیادهسازی شده باشند. نمونههایی از برخی کاراکترهای خطرناک رایج عبارتند از:
115 | > \< \> \" \' % ( ) & + \\ \\\' \\\"
116 |
117 | * کاراکترهای خط جدید را بررسی کنید
118 | %0d, %0a, \\r, \\n
119 | * کاراکترهای تغییر مسیر یا تاثیر گذار در آدرس دهی را بررسی کنید
120 | (../ یا ..\\)
121 | در مواردی که استانداردهای بسط داده شدهی
122 | UTF-8
123 | جزو ورودیهای قابل قبول تعریف شده، موارد آدرسدهی معادل زیر را نیز بررسی کنید:
124 | %c0%ae%c0%ae/
125 |
126 | **HTML Entity انکد کردن:** فرآیند جایگزینی برخی از کاراکترهای
127 | ASCII
128 | با معادل آن در
129 | HTML
130 | به عنوان مثال این شیوه انکد کردن میتواند علامت کوچکتر را
131 | < با <
132 | جایگزین کند. این موارد در اکثر مفسرها، به ویژه مرورگرها،
133 | بیاثر هستند که میتواند حملات سمت کاربر را کاهش دهد.
134 |
135 | **تاثیر:** اندازهگیری اثر منفی وقوع یک رویداد نامطلوب بر کسب و کار.
136 | نتیجه سوء استفاده از یک آسیبپذیری چه خواهد بود.
137 |
138 | **اعتبارسنجی ورودیها:** مجموعهای از کنترلها که ویژگیهای همه دادههای ورودی
139 | را بررسی و تایید میکند به گونهای که دادهها مطابق چیزی باشند که
140 | در برنامهکاربردی مربوطه انتظار میرود. به عنوان مثال نوع داده، طول
141 | قابل قبول، محدوده مجاز آن، کاراکترهای قابل قبول و اینکه
142 | شامل کاراکترهای خطرناک شناخته شده نباشند.
143 |
144 | **یکپارچگی:** حصول اطمینان از اینکه اطلاعات دقیق، کامل
145 | و معتبر است و توسط یک اقدام غیرمجاز تغییر نکرده است.
146 |
147 | **رویدادنگاری:** این موضوع میبایست شامل موارد زیر باشد:
148 |
149 | ۱. مهر زمانی از اجزاء قابل اعتماد سیستم
150 | ۲. درجهبندی شدت برای هر رویداد
151 | ۳. برچسبگذاری رویدادهای امنیتی، در صورتی که با سایر رویدادها مخلوط شده باشند
152 | ۴. هویت حسابکاربری که باعث این رویداد شده است
153 | ۵. IP مرتبط با درخواست
154 | ۶. نتیجه رویداد - موفقیت/شکست
155 | ۷. شرح واقعه
156 |
157 | حملاتی نظیر امتحان کردن یک رمزعبور ثابت برای حسابکاربریهای مختلف
158 | شیوهای است که در راستای دور زدن قفل شدن یک حسابکاربری خاص بکار میرود.
159 | این موضوع در زمانی رخ میدهد که شناسههای کاربری قابل مشاهده و یا حدس زدن هستند.
160 | توصیه میشود نظارت برای شناسایی اینگونه حملات داشته باشید.
161 |
162 | **مدیریت حافظه:** مجموعهای از کنترلها که به نحوهی
163 | استفاده از حافظه و بافر میپردازند.
164 |
165 | **کاهش تاثیر:** اقداماتی که برای کاهش شدت یک آسیبپذیری انجام میشود.
166 | این اقدامات میتواند شامل حذف آسیبپذیری، ایجاد شرایطی برای سختتر شدن
167 | بهرهبرداری از آسیبپذیری، یا کاهش تاثیر منفی بهرهبرداری موفق از آن باشد.
168 |
169 | **احرازهویت چندعاملی (MFA):** یک نوع فرایند احرازهویت که
170 | کاربر را ملزم به تولید و استفاده از چند نوع اعتبارنامه متمایز میکند.
171 | به طور معمول این موضوع بر اساس موارد زیر است:
172 |
173 | * چیزی که تحت اختیار دارند نظیر تلفن همراه
174 | * چیزی که میدانند، مثلا یک کد
175 | * چیزی که هستند، به عنوان مثال اطلاعات بیولوژیکی نظیر اثر انگشت
176 |
177 | **انکد کردن خروجی:** مجموعهای از کنترلها که به استفاده از انکد کردن
178 | برای اطمینان از ایمن بودن داده خروجی برنامه میپردازد.
179 |
180 | **کوئریهای پارامتری:**
181 | کوئری مورد استفاده خود را از دادههایی که قرار است جایگذاری شوند جدا نمایید.
182 | ساختار کوئری در بخشهایی قرار است با دادههای شما تکمیل گردد.
183 | شیوه صحیح این امر بدین صورت است که کوئری مربوطه و دادههایی که قرار است
184 | در آن جایگذاری شوند، به صورت جداگانه برای پایگاهداده ارسال شوند.
185 | ابتدا کوئری برای پایگاهداده ارسال میشود و آماده میشود، سپس پارامترهای مربوطه
186 | ارسال و جایگذاری میشوند. اینگونه تفکیک پارامترها از کوئری برای پایگاهداده
187 | قابل انجام خواهد بود.
188 |
189 | **پیچیدگی رمزعبور:**
190 | الزامات پیچیدگی رمزعبور که توسط خطمشی یا مقررات تعیین شده است.
191 | اطلاعات مورد استفاده در احرازهویت میبایست از پیچیدگی کافی برخوردار باشند
192 | تا در مقابل حملاتی که معمولا قابل اجرا هستند مقاوم باشند.
193 | به عنوان مثال لزوم بر استفاده از حروف الفبا به همراه اعداد و/یا کاراکترهای خاص.
194 |
195 | **طول رمزعبور:** الزامات طول رمزعبور که توسط سیاست یا مقررات تعیین میشود.
196 | به طور معمول استفاده از رمزعبور هشت کاراکتری متداول است اما شانزده
197 | کاراکتر ایمنتر است. همچنین توصیه میشود از عبارات چندکلمهای استفاده گردد.
198 |
199 | **ورودهای دائمی**: ورودهای دائمی و پایدار را ممنوع کنید و
200 | خاتمه اعتبار نشست را به صورت دورهای تنظیم نمایید، حتی زمانی که نشست فعال است.
201 | اهمیت این موضوع برای برنامههایی که از اتصالات شبکهای قدرتمند پشتیبانی میکنند یا
202 | به سیستمهای حیاتی متصل میشوند دوچندان است.
203 | زمان خاتمه اعتبار آن میبایست از الزامات کسب و کار پشتیبانی کرده و کاربر
204 | باید اعلان کافی برای کاهش اثرات منفی دریافت کند.
205 |
206 | **بهروزرسانی ایمن:** روشی برای بهروزرسانی برنامه از منابع معتبر.
207 | اگر برنامه از بهروزرسانیهای خودکار استفاده میکند، از امضاهای رمزنگاری
208 | استفاده کنیداطمینان حاصل نمایید برنامهکاربردی شما آن امضا را تایید میکند.
209 | همچنین از کانالهای رمزنگاری شده برای انتقال کد از سرور میزبان استفاده کنید.
210 |
211 | **تطهیر داده:** فرایندی است که
212 | با حذف، جایگزینی، کذگذاری یا گریز از کاراکترها، دادههایی که
213 | ممکن است آسیبزا باشند را ایمن میکند.
214 |
215 | **کنترلهای امنیتی:** اقداماتی که در آن
216 | آسیبپذیریهای احتمالی را کاهش میدهد و اطمینان حاصل میکند
217 | که نرمافزار تنها به شیوهی مورد نظر عمل میکند.
218 |
219 | **الزامات امنیتی:** مجموعهای از
220 | الزامات طراحی و عملکردی که در راستای ساخت و
221 | استقرار نرمافزار به شیوهی ایمن کمک میکند.
222 |
223 | **احرازهویت متوالی:**
224 | وقتی دادههای احرازهویت در صفحات متوالی درخواست
225 | میشود به جای اینکه یکبار بر روی صفحهای واحد درخواست گردد.
226 |
227 | **مدیریت نشست:** مجموعهای از کنترلها که کمک میکند
228 | برنامههای کاربردی وب نشستهای
229 | http
230 | را به شیوهای امن مدیریت کند.
231 |
232 | مقادیر و شناسههای نشست نباید در آدرس صفحات، خطاها
233 | و یا رویدادها افشاء گردد. این شناسهها تنها میبایست در سرآیند کوکی
234 | قرار گیرد. به عنوان مثال شناسههای مربوط به نشست را
235 | تحت قالب پارامترهای درخواست
236 | GET
237 | ارسال نکنید.
238 |
239 | **دادههای وضعیت:** دادههایی که توسط برنامهکاربردی و یا سرور
240 | مورد استفاده قرار میگیرند تا ارتباط پایدار کاربر را میسر کنند و
241 | وضعیت کاربر به صورت پیوسته در درخواستهای متوالی باقی بماند.
242 |
243 | **سیستم:** یک اصطلاح عمومی که سیستمعاملها، وبسرور، فریمورکهای کاربردی
244 | و زیرساختهای مرتبط را پوشش میدهد.
245 |
246 | **تنظیمات سیستم:** مجموعهای از کنترلها که اطمینان میدهد
247 | اجزاء زیرساختی نرمافزار به صورت ایمن استقرار یافته است.
248 |
249 | **عامل تهدید:** هر چیزی که ممکن است تاثیر منفی بر سیستم داشته باشد.
250 | این ممکن است یک کاربر مخرب باشد که میخواهد کنترلهای امنیتی سیستم را
251 | به خطر بیندازد، ممکن است یک سوء استفاده تصادفی از سیستم باشد یا
252 | یک تهدید فیزیکی مانند آتشسوزی یا سیل باشد.
253 |
254 | **مرزهای اعتماد:** یک مرز اعتماد، اجزای سیستم را
255 | تحت کنترل مستقیم شما قرار میدهد. تمامی اتصالات و دادههای سیستمهای خارج
256 | از کنترل مستقیم شما، از جمله کلیه کاربران و سیستمهایی که توسط طرفهای دیگر
257 | مدیریت میشوند، باید غیرقابل اعتماد در نظر گرفته شوند و قبل از مجازشماری برای
258 | هرگونه تعامل با سیستم شما میبایست بررسی و تایید شوند.
259 |
260 | **آسیبپذیری:** ضعفی که سیستم را مستعد حمله یا آسیب میکند.
261 |
262 | \newpage
263 |
--------------------------------------------------------------------------------
/stable-fa/03-appendices/07-references.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: شیوههای کدنویسی امن
5 | tags: SCP-QRG
6 | document: راهنمای کدنویسی امن
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | # پیوست سوم: منابع خارجی
12 |
13 | ## مراجع ذکر شده
14 |
15 | - SANS CIS Controls version 8
16 |
17 | >
18 |
19 | - Web Application Security Consortium
20 |
21 | >
22 |
23 | - Common Weakness Enumeration (CWE)
24 |
25 | >
26 |
27 | - CERT Secure Coding
28 |
29 | >
30 |
31 | - MSDN Security Developer Center
32 |
33 | >
34 |
35 |
36 | ## سایتهای مشاوره امنیتی
37 |
38 | منابع مفید برای بررسی آسیبپذیریهای شناخته شده در زیرساختها و فریمورکهای پشتیبان
39 |
40 | > Secunia Citrix Vulnerability List:
41 |
42 | -
43 |
44 | > Common Vulnerability Enumeration:
45 |
46 | -
47 |
--------------------------------------------------------------------------------
/stable-fa/03-appendices/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: شیوههای کدنویسی امن
5 | tags: SCPQRG
6 | document: راهنمای کدنویسی امن
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ### پیوست اول. [بررسی اجمالی](03-overview.md)
12 |
13 | ### پیوست دوم. [واژهنامه](05-glossary.md)
14 |
15 | ### پیوست سوم. [منابع خارجی](07-references.md)
16 |
--------------------------------------------------------------------------------
/stable-fa/03-appendices/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-en" %}
2 |
--------------------------------------------------------------------------------
/stable-fa/index.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | layout: col-document
4 | title: شیوههای کدنویسی امن
5 | tags: SCPQRG
6 | document: راهنمای کدنویسی امن
7 |
8 | ---
9 |
10 | {% include breadcrumb.html %}
11 | ## فهرست
12 |
13 | ### ۱. [مقدمه](01-introduction/05-introduction.md)
14 |
15 | ### ۲. [چکلیست](02-checklist/05-checklist.md)
16 |
17 | ### پیوست اول. [بررسی اجمالی](03-appendices/03-overview.md)
18 |
19 | ### پیوست دوم. [واژهنامه](03-appendices/05-glossary.md)
20 |
21 | ### پیوست سوم. [منابع خارجی](03-appendices/07-references.md)
22 |
--------------------------------------------------------------------------------
/stable-fa/info.md:
--------------------------------------------------------------------------------
1 | {% include navigation.html collection="stable-en" %}
2 |
--------------------------------------------------------------------------------
/stable-fa/title.pdf.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | lang: fa-FA
3 | author: Open Worldwide Application Security Project (OWASP)
4 | version: Stable
5 | date: فوریه ۲۰۲۳ به بعد
6 | rights: Creative Commons Attribution ShareAlike 4.0 International (CC BY-SA 4.0)
7 | geometry: "left=3cm,right=2.5cm,top=2cm,bottom=2cm"
8 | header-includes: |
9 | \usepackage{fancyhdr}
10 | \pagestyle{fancy}
11 | \fancyhead{}
12 | \fancyhead[RE,RO]{February 2023 onwards}
13 | \fancyfoot{}
14 | \fancyfoot[LE,LO]{Stable version}
15 | \fancyfoot[RE,RO]{\thepage}
16 | ...
17 |
--------------------------------------------------------------------------------
/stable-fa/title.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | lang: fa-FA
3 | title:
4 | - type: main
5 | text: شیوههای کدنویسی امن
6 | - type: subtitle
7 | text: راهنمای کدنویسی امن
8 | creator:
9 | - role: author
10 | text: Open Worldwide Application Security Project (OWASP)
11 | - role: editor
12 | text: Keith Turpin
13 | - role: translator
14 | text: Ashkan Rafiee
15 | version: Stable
16 | date: فوریه ۲۰۲۳ به بعد
17 | rights: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
18 | ...
19 |
--------------------------------------------------------------------------------
/tab_archive.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Archive
3 | layout: null
4 | tab: true
5 | order: 3
6 | tags: archive
7 | ---
8 | #### This is the archive of the original SCP web page
9 |
10 | ## Welcome to the Secure Coding Practices Quick Reference Guide Project
11 |
12 | The Secure Coding Practices Quick Reference Guide is a technology
13 | agnostic set of general software security coding practices, in a
14 | comprehensive checklist format, that can be integrated into the
15 | development lifecycle. At only 17 pages long, it is easy to read and
16 | digest.
17 |
18 | The focus is on secure coding requirements, rather then on
19 | vulnerabilities and exploits. It includes an introduction to Software
20 | Security Principles and a glossary of key terms.
21 |
22 | It is designed to serve as a secure coding kick-start tool and easy
23 | reference, to help development teams quickly understand secure coding
24 | practices.
25 |
26 | ### Sections of the Guide:
27 |
28 | - Table of contents
29 | - Introduction
30 | - Software Security Principles Overview
31 | - Secure Coding Practices Checklist
32 | - Links to useful resources
33 | - Glossary of important terminology
34 |
35 | **Download the current v2 (Stable) release:**
36 |
37 | - [English version PDF](/www-pdf-archive/OWASP_SCP_Quick_Reference_Guide_v2.pdf )
38 | - [English version MSWord](Media:OWASP_SCP_Quick_Reference_Guide_v2.doc )
39 |
40 | **Translations:**
41 |
42 | - [Brazilian Portuguese Translation PDF](/www-pdf-archive/OWASP_SCP_v1.3_pt-BR.pdf )
43 | - [Portugal Portuguese Translation PDF](/www-pdf-archive/OWASP_SCP_v1.3_pt-PT.pdf )
44 | - [Korean Translation PDF](/www-pdf-archive/2011%EB%85%846%EC%9B%94_OWASP_%EC%8B%9C%ED%81%90%EC%96%B4%EC%BD%94%EB%94%A9%EA%B7%9C%EC%B9%99_v2_KOR.pdf )
45 | - [Spanish Translation doc](Media:OWASP_SCP_Quick_Reference_Guide_SPA.doc )
46 | - [Chinese Translation PDF](/www-pdf-archive/OWASP_SCP_Quick_Reference_Guide_%28Chinese%29.pdf )
47 |
48 | **Related Presentations:**
49 | This slide deck incorporates many concepts from the Quick reference
50 | guide, but also utilizes other OWASP resources.
51 | Web Application Development Dos and Donts -
52 | [Presentation from the Royal Bank of Scotland](www.owasp.org/images/b/ba/Web_Application_Development_Dos_and_Donts.ppt)
53 |
54 | **Related Projects:**
55 | [Go programming language secure coding practices guide](https://github.com/Checkmarx/Go-SCP),
56 | based on the OWASP Secure Coding Practices
57 |
58 | **Project Feedback and Disposition History**
59 |
60 | [XLS Feedback Spreadsheet](www.owasp.org/images/6/64/SCP-QRG_Revisions_History.xls)
61 |
62 | -----
63 |
64 | ## Feedback and Participation:
65 |
66 | I hope you find the OWASP Secure Coding Practices Quick Reference Guide
67 | Project useful. Please contribute to the Project by sending your
68 | comments, questions, and suggestions to
69 | [keith.turpin@owasp.org](mailto:Keith.Turpin@owasp.org).
70 |
71 | Project mailing list and archives:
72 | [subscription page.](https://lists.owasp.org/mailman/listinfo/owasp-secure-coding-practices)
73 |
74 | -----
75 |
76 | ## Project Contributors:
77 |
78 | If you contribute to this Project, please add your name here
79 | **Project Lead:**
80 |
81 | - Keith Turpin
82 |
83 | **Contributors:**
84 | \* Dan Kranz
85 |
86 | - Walt Pietrowski
87 | - Catherine Spencer
88 | - [Caleb McGary](mailto:Caleb.mcgary@gmail.com)
89 | - [Brad Causey](mailto:bradcausey@owasp.org)
90 | - [Ludovic Petit](mailto:ludovic.petit@owasp.org)
91 | - [Michael V. Scovetta](mailto:michael.scovetta@gmail.com)
92 | - [Jim Manico](mailto:jim.manico@owasp.org)
93 | - Jason Coleman
94 | - [Anurag Agarwal](mailto:anurag.agarwal@yahoo.com)
95 | - [Andrew Petukhov](mailto:petand@lvk.cs.msu.su)
96 |
97 |
98 | **Translation Contributors**
99 |
100 | **Portuguese Translation**
101 | \* [Tarcizio Vieira Neto](mailto:tarciziovn@gmail.com)
102 |
103 | - [Sílvio Correia Filho](mailto:silviofilhosf@gmail.com)
104 | - [Leandro Gomes](mailto:leandrock@gmail.com)
105 |
106 | **Korean Translation**
107 | \* OWASP Korea chapter **Spanish Translation**
108 | \* Canedo,Gerardo
109 |
110 | - Flores,Mauro
111 | - Hill,Alberto
112 | - Martinez,Mateo
113 | - Papaleo,Mauricio
114 | - Soarez,Nicolás
115 | - Targetta, Cecilia
116 |
117 | **Chinese Translation**
118 | \* [Jie Wang](mailto:wangj@owasp.org.cn)
119 |
120 | - Yongliang He
121 | - Henghui Lin
122 |
123 | #### Project About
124 |
125 | __NOTOC__
126 |
127 | [Secure Coding Practices - Quick Reference Guide](Category:OWASP_Project )
128 | [Category:OWASP_Document](Category:OWASP_Document )
129 | [Category:OWASP Best Practices](Category:OWASP_Best_Practices )
130 | [Category:OWASP_Download](Category:OWASP_Download )
131 | [OWASP Release Quality Document](Category:OWASP_Release_Quality_Document )
132 | [Category:SAMM-SR-1](Category:SAMM-SR-1 )
133 |
--------------------------------------------------------------------------------
/tab_contributors.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Contributors
3 | layout: null
4 | tab: true
5 | order: 2
6 | tags: contributors
7 | ---
8 |
9 | If you contribute to this Project, please add your name here.
10 |
11 | ## Project Leaders
12 |
13 | * Keith Turpin
14 | * [Jon Gadsden][jon-gadsden]
15 |
16 | ## Contributors
17 |
18 | * Andrew Petukhov
19 | * Anurag Agarwal
20 | * Brad Causey
21 | * Caleb McGary
22 | * Catherine Spencer
23 | * Dan Kranz
24 | * Jason Coleman
25 | * Jim Manico
26 | * Ludovic Petit
27 | * Michael V. Scovetta
28 | * Walt Pietrowski
29 |
30 | ## Translations
31 |
32 | ### Portuguese (PT & BR)
33 |
34 | * Tarcizio Vieira Neto
35 | * Alexandre Pupo
36 | * Carlos Serrão
37 | * Jorge Olimpia
38 | * Leandro Gomes
39 | * Paulo Silva
40 | * Rogério Vicente
41 | * Sílvio Correia Filho
42 |
43 | ### Korean
44 |
45 | * OWASP Korea chapter
46 |
47 | ### Spanish
48 |
49 | * Gerardo Canedo
50 | * Mauro Flores
51 | * Alberto Hill
52 | * Mateo Martinez
53 | * Mauricio Papaleo
54 | * Nicolás Soarez
55 | * Cecilia Targetta
56 |
57 | ## Chinese
58 |
59 | * Henghui Lin
60 | * Jie Wang
61 | * Yongliang He
62 |
63 | ## Persian (Farsi)
64 |
65 | * Ashkan Rafiee
66 |
67 | [jon-gadsden]: mailto:jon.gadsden@owasp.org
68 |
--------------------------------------------------------------------------------
/tab_download.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Download
3 | layout: null
4 | tab: true
5 | order: 1
6 | tags: downloads
7 | ---
8 |
9 | ## v2.1 (Cornucopia)
10 |
11 | Version of SCP with a numbering system used by the [Cornucopia project][cornucopia] playing cards.
12 |
13 | | Language | PDF | DOC |
14 | | -------- | :-: | :-: |
15 | | English | [download][en21pdf] | [download][en21doc] |
16 |
17 | ## v2.0.1 (current release)
18 |
19 | | Language | PDF | eBook |
20 | | -------- | :-: |
21 | | Brazilian | [download][br201pdf] | [download eBook][br201ebook] |
22 | | Chinese | [download][cn201pdf] | [download eBook][cn201ebook] |
23 | | English | [download][en201pdf] | [download eBook][en201ebook] |
24 | | Korean | [download][ko201pdf] | [download eBook][ko201ebook] |
25 | | Portuguese | [download][pt201pdf] | [download eBook][pt201ebook] |
26 | | Spanish | [download][es201pdf] | [download eBook][es201ebook] |
27 |
28 | ## v2.0
29 |
30 | | Language | PDF | DOC |
31 | | -------- | :-: | :-: |
32 | | English | [download][en20pdf] | [download][en20doc] |
33 | | Korean | [download][ko20pdf] | - |
34 |
35 | ## v1.3
36 |
37 | | Language | PDF | DOC |
38 | | -------- | :-: | :-: |
39 | | Brazilian | [download][br13pdf] | - |
40 | | Portuguese | [download][pt13PDF] | - |
41 |
42 | ## v1.1 (last reviewed release)
43 |
44 | | Language | PDF | DOC |
45 | | -------- | :-: | :-: |
46 | | English | [download][en11pdf] | [download][en11doc] |
47 |
48 | ## v1
49 |
50 | | Language | PDF | DOC |
51 | | -------- | :-: | :-: |
52 | | Chinese | [download][cn10pdf] | - |
53 | | English | [download][en10pdf] | [download][en10doc] |
54 | | Spanish | - | [download][es10doc] |
55 |
56 | -----
57 |
58 | ## other downloads
59 |
60 | * [Project Pamphlet][pamphlet]
61 | * [Project Presentation][presentation]
62 | * [Slide deck][appsecusa10]- Presented by Keith Turpin on OWASP AppSec USA 2010
63 | * [Archive XLS Feedback Spreadsheet][feedback]
64 |
65 | [br201ebook]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.pt-BR.epub
66 | [br201pdf]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.pt-BR.pdf
67 | [br13pdf]: https://owasp.org/www-pdf-archive/OWASP_SCP_v1.3_pt-BR.pdf
68 | [cn10pdf]: https://owasp.org/www-pdf-archive//OWASP_SCP_Quick_Reference_Guide_(Chinese).pdf
69 | [cn201ebook]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.zh-CN.epub
70 | [cn201pdf]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.zh-CN.pdf
71 | [en10pdf]: https://owasp.org/www-pdf-archive/OWASP_SCP_Quick_Reference_Guide_v1.pdf
72 | [en10doc]: https://wiki.owasp.org/images/1/10/OWASP_SCP_Quick_Reference_Guide_v1.doc
73 | [en11pdf]: http://www.owasp.org/images/2/2f/OWASP_SCP_Quick_Reference_Guide_v1-1b.pdf
74 | [en11doc]: http://wiki.owasp.org/images/0/0b/OWASP_SCP_Quick_Reference_Guide_v1-1b.doc
75 | [en20pdf]: https://owasp.org/www-pdf-archive/OWASP_SCP_Quick_Reference_Guide_v2.pdf
76 | [en20doc]: https://wiki.owasp.org/images/a/ac/OWASP_SCP_Quick_Reference_Guide_v2.doc
77 | [en201ebook]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.en-US.epub
78 | [en201pdf]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.en-US.pdf
79 | [en21pdf]: assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.pdf
80 | [en21doc]: assets/docs/OWASP_SCP_Quick_Reference_Guide_v21.doc
81 | [es10doc]: https://wiki.owasp.org/images/c/c8/OWASP_SCP_Quick_Reference_Guide_SPA.doc
82 | [es201ebook]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.es-UY.epub
83 | [es201pdf]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.es-UY.pdf
84 | [ko20pdf]: https://owasp.org/www-pdf-archive//2011%EB%85%846%EC%9B%94_OWASP_%EC%8B%9C%ED%81%90%EC%96%B4%EC%BD%94%EB%94%A9%EA%B7%9C%EC%B9%99_v2_KOR.pdf
85 | [ko201ebook]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.ko-KR.epub
86 | [ko201pdf]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.ko-KR.pdf
87 | [pt13pdf]: https://owasp.org/www-pdf-archive/OWASP_SCP_v1.3_pt-PT.pdf
88 | [pt201ebook]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.pt-PT.epub
89 | [pt201pdf]: https://github.com/OWASP/secure-coding-practices-quick-reference-guide/releases/download/v2.0.1/OWASP_SCP_Quick_Reference_Guide.pt-PT.pdf
90 |
91 | [appsecusa10]: https://wiki.owasp.org/images/5/54/Secure_Coding_Practices_Quick_Ref_5.ppt
92 | [cornucopia]: https://owasp.org/www-project-cornucopia/
93 | [feedback]: https://wiki.owasp.org/images/6/64/SCP-QRG_Revisions_History.xls
94 | [pamphlet]: https://owasp.org/www-pdf-archive/Flyer_Secure_Coding_Practices_Quick_Reference_Guide_V2.pdf
95 | [presentation]: https://wiki.owasp.org/images/f/fd/Secure_Coding_Practices_Quick_Ref_6.ppt
96 |
--------------------------------------------------------------------------------