Skip to content

Commit

Permalink
Merge pull request #1 from Newcastle-Cyber-Security-Group/init
Browse files Browse the repository at this point in the history
Hello world!
  • Loading branch information
JayRovacsek authored Feb 18, 2024
2 parents ad64c7b + 978d239 commit 3531932
Show file tree
Hide file tree
Showing 9 changed files with 559 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake .
14 changes: 14 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: checks

on:
pull_request:
push:
branches: [main]

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- run: nix flake check
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.direnv
result
.pre-commit-config.yaml
214 changes: 214 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# Contributing

## Introduction

This document outlines the process for updating the charter of the
Newcastle Cybersecurity Group (NCSG) using a pull request (PR) and approval
from another organiser, with all status checks configured to pass before
merging the changes.

Additionally, it includes guidance on optionally
applying pre-commit hooks using Nix. Required code for
this process exists in the repository already and can be leveraged
to ensure consistent check processes as the status checks configured.

## Change Process

To propose changes to the charter, follow these steps:

1. **Fork the Repository**

- Fork the repository containing the NCSG charter to your own GitHub
account.

2. **Create a New Branch**

- Create a new branch on your forked repository. Use a descriptive name
for the branch related to the changes you are proposing.

3. **Make Changes**

- Make the necessary updates to the charter document in your branch.
Ensure that the changes comply with the guidelines outlined in the
charter update process.

4. **Submit a Pull Request (PR)**

- Once the changes are made, submit a PR from your branch to the main
repository's master branch. Provide a clear and concise description of
the proposed changes in the PR description.

5. **Status Checks**

- All status checks configured for the repository must pass before the PR
can be merged. These status checks may include automated tests, code
formatting checks, and other quality assurance measures.

6. **Approval**

- Request approval for your PR from an organiser of the NCSG. The
approving organiser should review the proposed changes to ensure they
align with the group's objectives and principles.

7. **Address Feedback (if any)**

- If any feedback or suggested modifications are provided during the
review process, address them promptly in your PR. Make the necessary
adjustments to the charter document as needed.

8. **Merge PR**

- Once the PR has been approved by another organiser and all status checks
are passing, the PR can be merged into the main repository's master
branch.

9. **Update Documentation (if necessary)**

- If significant changes were made to the charter, ensure that the
documentation outlining the update process is also updated accordingly.

10. **Announce Changes**
- Communicate the approved changes to the NCSG members through
appropriate channels, such as group meetings, email, or messaging
platforms.

## Status Checks

The status checks applied on this repository match the
pre-commit controls applied via nix; you can avoid status failures
by ensuring you've checked locally ahead of time for any changes.

Two paths exist to do this as described below depending on your
tooling preferences.

## Using Pre-commit Hooks via Nix Natively (Optional)

Using the pre-commit hooks from nix natively can be achieved by the below
steps:

1. **Install Nix**

- Utilise the most suitable method of installing nix for
your configuration. We'd recommend the [DeterminateSystems Installer](https://github.com/DeterminateSystems/nix-installer)
however a number of avenues exist.

2. **Activate Ephemeral Shell**

- Activate an ephemeral shell via the below command:

```sh
nix develop
```

- Loading the above shell will generate a
`.pre-commit-config.yaml` file in the root of your repository

3. **Run All Checks**

- Running the following command will apply all checks:

```sh
nix flake check
```

- Optionally, the ephemeral shell will include the `pre-commit`
tool also, run any of the following checks in isolation if you require:

```sh
pre-commit run actionlint
pre-commit run deadnix
pre-commit run nixfmt
pre-commit run prettier
pre-commit run statix
pre-commit run statix-write
pre-commit run typos
```

4. **Commit Changes**
- Now, every time you commit changes to the repository, the pre-commit
hooks will automatically format and validate the charter document
according to the defined rules.

## Using Pre-commit Hooks via Docker (Optional)

Using the pre-commit hooks from docker can be achieved by the below
steps:

1. **Pull Image**

- Pull the latest nixpkgs flake image via the following command:

```sh
docker pull nixpkgs/nix-flakes:latest
```

2. **Utilise Docker Image in Current Directory**

- Enter the docker instance via the following command:

```sh
docker run --rm -it -v $(pwd):/tmp -w /tmp nixpkgs/nix-flakes:latest
```

3. **Activate Ephemeral Shell**

- Activate an ephemeral shell via the below command:

```sh
nix develop
```

- Loading the above shell will generate a
`.pre-commit-config.yaml` file in the root of your repository

4. **Run All Checks**

- Running the following command will apply all checks:

```sh
nix flake check
```

- Optionally, the ephemeral shell will include the `pre-commit`
tool also, run any of the following checks in isolation if you require:

```sh
pre-commit run actionlint
pre-commit run deadnix
pre-commit run nixfmt
pre-commit run prettier
pre-commit run statix
pre-commit run statix-write
pre-commit run typos
```

5. **Commit Changes**
- Now, every time you commit changes to the repository, the pre-commit
hooks will automatically format and validate the charter document
according to the defined rules.

## Shortcut Method

For both the docker and nix routes, you can do the following commands
to run checks without some of the intermediate steps:

### Nix

```sh
nix flake check
```

### Docker

```sh
docker run --rm -it -v $(pwd):/tmp -w /tmp nixpkgs/nix-flakes:latest nix flake check
```

## Conclusion

Following this process ensures transparency, collaboration, and
accountability in updating the repository.

By leveraging pull requests and approvals, along with rigorous status checks
and optional pre-commit hooks, the integrity and quality of the charter can be
maintained while accommodating necessary updates and improvements.
95 changes: 95 additions & 0 deletions ORGANISER_CHARTER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Charter for the Organizers of Newcastle Cybersecurity Group (NCSG)

## Mission Statement

The mission of the Newcastle Cybersecurity Group (NCSG) is to create a
collaborative and inclusive community for individuals interested in
cybersecurity, where members can share knowledge, learn from each other, and
stay updated on the latest developments in the field.

## Purpose

The purpose of this charter is to outline the responsibilities and
expectations of the organizers of the NCSG, ensuring their active involvement
in the success and growth of the group.

## Organizer Responsibilities

1. **Leadership**

- Organizers are expected to provide leadership and guidance to the group,
fostering an environment of collaboration and mutual respect.
- They should lead by example, demonstrating professionalism and integrity
in all interactions within the group.

2. **Event Planning and Coordination**

- Organizers are responsible for planning and coordinating group meetings,
workshops, seminars, and other events.
- They should ensure that events are relevant, informative, and engaging
for group members, catering to a diverse range of interests and skill
levels within the cybersecurity field.

3. **Communication**

- Organizers must maintain regular communication with group members,
providing updates on upcoming events, relevant news, and opportunities
within the cybersecurity community.
- They should be responsive to inquiries and feedback from group members,
actively seeking input to improve the group's activities and offerings.

4. **Knowledge Sharing**

- Organizers should actively participate in knowledge sharing within the
group, contributing insights, resources, and expertise to facilitate
learning and growth among members.
- They should encourage collaboration and mentorship opportunities,
fostering a supportive environment for members to develop their skills
and advance their careers in cybersecurity.

5. **Professional Development**

- Organizers are encouraged to pursue ongoing professional development in
the field of cybersecurity, staying updated on emerging trends,
technologies, and best practices.
- They should leverage their knowledge and expertise to enhance the
quality and relevance of the group's activities and events.

6. **Presentation Requirement**
- Organizers are required to deliver a presentation or workshop at least
once every two years, flexibly scheduled to accommodate their
availability and expertise.
- Presentations should cover topics relevant to cybersecurity, catering
to the interests and skill levels of group members.
- Organizers should use presentations as an opportunity to share their
knowledge, insights, and experiences with the group, fostering learning
and discussion amongst members.

## Adherence as an Absolute Requirement

All organizers are required to adhere strictly to the provisions of this
charter. Failure to fulfill their responsibilities as outlined may result in
reconsideration of their role within the NCSG.

## Accountability

Organizers are accountable to the members of the NCSG, as well as to each
other, for upholding the principles outlined in this charter. In the event of
any concerns or disputes, organizers should work together to resolve issues in
a fair and transparent manner, prioritizing the best interests of the group
and its members.

## Adherence to Charter

All organizers are expected to read, understand, and strictly adhere to the
provisions of this charter. Any proposed amendments or revisions to the
charter must be discussed and approved by the group's organizers, with input
from group members as appropriate.

## Conclusion

By committing to the principles outlined in this charter, the organizers of
the NCSG demonstrate their dedication to fostering a vibrant and supportive
community for cybersecurity professionals and enthusiasts. Through
collaborative efforts and shared expertise, the group will continue to thrive
and make valuable contributions to the cybersecurity landscape.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Newcastle Cybersecurity Group Charter Documents

Welcome!

This repository houses the charter documents for the Newcastle Cybersecurity
Group

Please refer to the following documents:

- [Organiser Charter](./ORGANISER_CHARTER.md)
- [Contributing Guide](./CONTRIBUTING.md)
Loading

0 comments on commit 3531932

Please sign in to comment.