generated from finos/standards-project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 533: Update developer documentation #541
Open
dogle-scottlogic
wants to merge
6
commits into
finos:main
Choose a base branch
from
dogle-scottlogic:CCC-533-developer-guide
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c50c719
Issue 533: Update developer docs to be more a more detailed contribut…
dogle-scottlogic c270985
add gif examples
dogle-scottlogic 86e39e2
Update contributing readme location and name
dogle-scottlogic 144e2a6
Add snippet table
dogle-scottlogic 4b4d672
fix linter
dogle-scottlogic f920dcf
Update Controls Code from CT to CC
dogle-scottlogic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Contributors Guide | ||
|
||
## Overview | ||
|
||
This file holds general documentation relevant to contributing to the Common Cloud Controls project such as [project structure](#project-structure) and [VSCode](#vscode-1) information. For more specific documentation on contributing to the GitHub repository please see the [GitHub specific documentation](/.github/CONTRIBUTING.md). This is a working document and as such if you feel there is information missing please highlight it using the [issue section of the GitHub repository](https://github.com/finos/common-cloud-controls/issues). | ||
|
||
## Project structure | ||
|
||
This section provides a high-level overview of the project structure. | ||
|
||
### Top level | ||
|
||
- [.gitignore](https://git-scm.com/docs/gitignore): Standard ignore file for exclusion of files from source control. | ||
- [.gitvote.yml](https://github.com/cncf/gitvote): config file for GitVote. | ||
- [.prettierignore](https://prettier.io/): paths to exclude from prettier checks. | ||
- [Governance.md](/Governance.md): | ||
|
||
### .config | ||
|
||
The [`.config`](/.config) directory contains config for various tooling used in the project, e.g. [prettier](https://prettier.io/) and [markdownlint](https://github.com/DavidAnson/markdownlint). | ||
|
||
### .github | ||
|
||
The [`.github`](/.github) directory contains documents relevant specifically to github. These include the [CODEOWNERS](/.github/CODEOWNERS) file, documentation on [contributing](/.github/CONTRIBUTING.md) to the repository, [workflow](https://docs.github.com/en/actions/writing-workflows/about-workflows) definitions and [issue templates](/.github/ISSUE_TEMPLATE) for various common [github issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues) such as meeting minutes. | ||
|
||
### .vscode | ||
|
||
The [`.vscode`](/.vscode) directory contains files and configuration specific to the [vscode](https://code.visualstudio.com/docs/getstarted/settings) text editor. These include, settings, extensions and [snippet definitions](#snippets). | ||
|
||
### Delivery Tooling | ||
|
||
The [`delivery-tooling`](/delivery-tooling/) directory contains a selection of [`.go`](https://go.dev/) tooling and markdown files for use with creating a release. | ||
|
||
### Documentation | ||
|
||
The [`docs`](/docs/) directory is a centralised store for all documentation related to the project (excluding the top-level [README](/README.md) file). It contains information on the community guidelines, community policies, detailed information on governance, including the various [working groups](/docs/governance/working-groups/). The documentation directory also contains information on various reusable [resources](/docs/resources/readme.md) utilised in the project. | ||
|
||
### Schemas | ||
|
||
The [`schemas`](/schemas) directory contains the yaml validation schemas used in the project. Yaml validation schemas have been created for controls, features, metadata and threats files, to ensure that contributions follow the approved structure and contain required values. | ||
|
||
### Services | ||
|
||
The [`services`](/services/) directory is the main working directory of the project. It contains a list of common cloud services organised in a hierarchical way from high level resource type first becoming more granular. For example: | ||
|
||
```ascii | ||
services/ | ||
└── database/ | ||
└── relational/ | ||
└── warehouse/ | ||
``` | ||
|
||
Each resource should contain the following files in `.yaml` format: | ||
|
||
- `controls.yaml`: The common compliance controls for the resource. | ||
- `features.yaml`: The common features which define the resource. | ||
- `threats.yaml`: The security threats related to the resource. | ||
- `metadata.yaml`: Metadata on the resource such as resource details. | ||
|
||
The resource should also contain a `tests` directory containing details on how to test the resource is compliant. | ||
|
||
The top level of the `services` directory contains `yaml` files for common controls, features and threats which are common to multiple resources. It also contains the [`service-families.yaml`](/services/service-families.yaml) file which documents the service families and their descriptions. | ||
|
||
## VSCode | ||
|
||
### Snippets | ||
|
||
[VSCode snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets) are defined for common [features](.vscode/common-features.code-snippets), [threats](.vscode/common-threats.code-snippets) and [controls](.vscode/common-controls.code-snippets). | ||
To make use of these snippets start typing the snippet prefix in any `yaml` file and VSCode will offer you the option to auto-complete the snippet e.g. | ||
dogle-scottlogic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```yaml | ||
CF3 | ||
``` | ||
|
||
![snippet](/docs/resources/snippet.gif) | ||
|
||
#### Snippet overview | ||
|
||
| Snippet | Description | File | Prompt | | ||
| ----------------- | -------------------------------------- | ---------------------------------------------------------------------- | ---------- | | ||
| Threats File | Create a blank FINOS CCC Threats file | [threats.code-snippets](.vscode/threats.code-snippets) | `th`, `fi` | | ||
| Threat | Create a blank FINOS CCC Threat | [threats.code-snippets](.vscode/threats.code-snippets) | `th`, `fi` | | ||
| Common Threats\* | Create a common FINOS CCC Threat | [common-threats.code-snippets](.vscode/common-threats.code-snippets) | `CT` | | ||
| Feature File | Create a blank FINOS CCC Feature file | [features.code-snippets](.vscode/features.code-snippets) | `fe`, `fi` | | ||
| Feature | Create a blank FINOS CCC Feature | [features.code-snippets](.vscode/features.code-snippets) | `fe`, `fi` | | ||
| Common Features\* | Create a common FINOS CCC Feature | [common-features.code-snippets](.vscode/common-features.code-snippets) | `CF` | | ||
| Controls File | Create a blank FINOS CCC Controls file | [controls.code-snippets](.vscode/controls.code-snippets) | `co`, `fi` | | ||
| Control | Create a blank FINOS CCC Control | [controls.code-snippets](.vscode/controls.code-snippets) | `co`, `fi` | | ||
| Common Controls\* | Create a common FINOS CCC Control | [common-controls.code-snippets](.vscode/common-controls.code-snippets) | `CC` | | ||
| Metadata File | Create a blank FINOS CCC Metadata file | [metadata.code-snippets](.vscode/metadata.code-snippets) | `me`, `fi` | | ||
|
||
### YAML Schema validation | ||
|
||
By default, the contents of `.vscode/settings.json` should automatically be considered by Visual Studio Code. In-line suggestions should appear in the event that your file is not compatible with the corresponding schema. | ||
|
||
If this does not satisfy your use case for some reason, you can update your global VSCode settings to highlight issues using the schema files with the following steps: | ||
|
||
1. Install VSCode [Red Hat YAML extension](https://github.com/redhat-developer/vscode-yaml) | ||
2. Under VSCode `settings.json` add the following (or your local equivalent): | ||
|
||
```json | ||
"yaml.schemas": { | ||
"file:///<PATH_TO_CCC_REPO>/common-cloud-controls/schemas/controls-schema.json": "controls.yaml", | ||
"file:///<PATH_TO_CCC_REPO>/common-cloud-controls/schemas/features-schema.json": "features.yaml", | ||
"file:///<PATH_TO_CCC_REPO>/common-cloud-controls/schemas/metadata-schema.json": "metadata.yaml", | ||
"file:///<PATH_TO_CCC_REPO>/common-cloud-controls/schemas/threats-schema.json": "threats.yaml" | ||
} | ||
``` | ||
|
||
3. Save these settings and reload VSCode. | ||
|
||
![yaml](/docs/resources/yaml-validate.gif) |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this change will also need to remove .github/CONTRIBUTING.md, which is linked under the description when folks create a PR