Skip to content

Commit

Permalink
style: automatically reformat all files (openwall#638)
Browse files Browse the repository at this point in the history
Stop thinking and use the Prettier tool. The changes in this commit
were basically generated by a tool.
This is invasive, but important. So let's do it before version 1.0.

- The command to use is:
docker run --rm -e DEFAULT_BRANCH=main -e RUN_LOCAL=true \
  -e FIX_[each-toll]=true -e USE_FIND_ALGORITHM=true \
  -v $(pwd):/tmp/lint ghcr.io/super-linter/super-linter:v7.2.0

Signed-off-by: Claudio André <[email protected]>
  • Loading branch information
claudioandre-br committed Nov 21, 2024
1 parent 8e21a52 commit 7cb1acf
Show file tree
Hide file tree
Showing 21 changed files with 400 additions and 436 deletions.
16 changes: 8 additions & 8 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"threshold":0,
"noSymlinks":true,
"ignore":[
"**/.git/**",
"**/build_CI.yml",
"**/Releases/**",
"**/spelling.yml"
]
"threshold": 0,
"noSymlinks": true,
"ignore": [
"**/.git/**",
"**/build_CI.yml",
"**/Releases/**",
"**/spelling.yml"
]
}
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ Add your text here.
- [ ] Label as either: `bug`, `ci`, `docker`, `documentation`, `enhancement`.
- [ ] Sign unsigned commits.

[commitMessage]: https://github.com/openwall/john-packages/blob/main/docs/commit-messages.md#how-a-commit-message-should-be
[commitMessage]:
https://github.com/openwall/john-packages/blob/main/docs/commit-messages.md#how-a-commit-message-should-be
22 changes: 10 additions & 12 deletions CI/readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Continuous Integration and Continuous Delivery

The usage of Continuous Integration and Continuous Delivery is a method to frequently deliver
software to users by introducing automation into the stages of application development.
The usage of Continuous Integration and Continuous Delivery is a method to frequently deliver software to users by
introducing automation into the stages of application development.

## Testing

Using multiple providers, we've created a DevOps infrastructure. We are mostly interested
in quality assurance, CI (continuous integration), and CD (continuous delivery). To achieve
this goal, our testing scheme builds and inspects the source code of John the Ripper
using:
Using multiple providers, we've created a DevOps infrastructure. We are mostly interested in quality assurance, CI
(continuous integration), and CD (continuous delivery). To achieve this goal, our testing scheme builds and inspects the
source code of John the Ripper using:

### Operating Systems (OS)

Expand Down Expand Up @@ -59,14 +58,12 @@ using:
- Cygwin on Windows Server;
- OpenCL on CPU using Intel, and POCL (<http://portablecl.org/>) runtimes;
- OpenCL on GPU using Azure cloud (_work in progress_);
- And a final assessment using ARMv8 (aarch64), PowerPC64 Little-Endian,
RISC-V 64-bit, and IBM System z.
- And a final assessment using ARMv8 (aarch64), PowerPC64 Little-Endian, RISC-V 64-bit, and IBM System z.

- Plans and future vision:
- Develop a fully automated build and release pipeline using Azure DevOps Services
to create the CI/CD pipeline and Azure Services for deploying to development/staging and
production.
See the [release workflow here](https://github.com/openwall/john-packages/blob/main/CI/workflow.pdf);
- Develop a fully automated build and release pipeline using Azure DevOps Services to create the CI/CD pipeline and
Azure Services for deploying to development/staging and production. See the
[release workflow here](https://github.com/openwall/john-packages/blob/main/CI/workflow.pdf);
- Add support to ClusterFuzz (OSS-Fuzz);
- Add support to static code quality analyzer.

Expand Down Expand Up @@ -111,6 +108,7 @@ using:
## Obsolete Architectures

> [!IMPORTANT]
>
> We can no longer build and package for these environments:
- Any 32-bit build (e.g. i386, ARM v7, and powerpc);
Expand Down
118 changes: 46 additions & 72 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,127 +2,101 @@

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for
everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity
and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion,
or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:
Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take
appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for
moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing
the community in public spaces. Examples of representing our community include using an official email address, posting
via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
<https://github.com/openwall/john-packages/issues>.
All complaints will be reviewed and investigated promptly and fairly.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible
for enforcement at <https://github.com/openwall/john-packages/issues>. All complaints will be reviewed and investigated
promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem
in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the
community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation
and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.
**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including
unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding
interactions in community spaces as well as external channels like social media. Violating these terms may lead to a
temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified
period of time. No public or private interaction with the people involved, including unsolicited interaction with those
enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate
behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.
**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
For answers to common questions about this code of conduct, see the FAQ at <https://www.contributor-covenant.org/faq>.
Translations are available at <https://www.contributor-covenant.org/translations>.
64 changes: 31 additions & 33 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email,
or any other method with the owners of this repository before making a change.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other
method with the owners of this repository before making a change.

- If you have questions, please ask them first in the mailing list john-users at lists.openwall.com;
- Use GitHub issues to keep track of ideas, enhancements, tasks, and bugs. NEVER as a support forum;
Expand All @@ -11,44 +11,41 @@ or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

By the way, we have a bot that automatically closes issues after a certain amount of time unless someone
specifically mark them "keep open". Reopened issues will receive attention.
By the way, we have a bot that automatically closes issues after a certain amount of time unless someone specifically
mark them "keep open". Reopened issues will receive attention.

Contributors donate their free time to work on the project because they enjoy it. If nobody cares about
a problem it will likely remain open forever, lost in a list of issues that no one minds. The
contributors have other things to do, like live their lives.
Contributors donate their free time to work on the project because they enjoy it. If nobody cares about a problem it
will likely remain open forever, lost in a list of issues that no one minds. The contributors have other things to do,
like live their lives.

I think it's reasonable to expect users to try a little harder to help, if they care about something.

## Bug Reports

Try to be clear about your environment and what you are doing. Do your best and share a sample hash or
file that can be used to reproduce.
Try to be clear about your environment and what you are doing. Do your best and share a sample hash or file that can be
used to reproduce.

## Scope and Goals

The project aims to create and maintain packages for John the Ripper executables. Also, maintain tools to
support the development and use of John the Ripper software.
The project aims to create and maintain packages for John the Ripper executables. Also, maintain tools to support the
development and use of John the Ripper software.

The `*2john` tools need a Docker image containing Python 2 and Python 3 and other dependencies
properly installed and configured; however, this repository is not suitable for that.
The `*2john` tools need a Docker image containing Python 2 and Python 3 and other dependencies properly installed and
configured; however, this repository is not suitable for that.

The keywords are: cloud, Docker, hardening, sandboxing, IDE, Continuous Delivery.

## Our Responsibilities

We assume good faith and that's the only way we can interact in Open Source,
but we must have rules to protect the community.
We assume good faith and that's the only way we can interact in Open Source, but we must have rules to protect the
community.

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to the Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to the Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Other sources of information

Expand All @@ -59,12 +56,12 @@ For various tips and tricks, also see [the docs folder](https://github.com/openw

We adhere to standards used by the community.

We use linters and static code analyzers that will complain about rule violations. Furthermore, we recommend
that, if possible, before submitting your contribution, you perform all the steps listed in the "create a
suitable PR" topic below.
We use linters and static code analyzers that will complain about rule violations. Furthermore, we recommend that, if
possible, before submitting your contribution, you perform all the steps listed in the "create a suitable PR" topic
below.

The row length should be between 80 and 120 columns, which is good for use on modern monitors, including
laptops. However, there are some cases where the rule must be overcome by common sense.
The row length should be between 80 and 120 columns, which is good for use on modern monitors, including laptops.
However, there are some cases where the rule must be overcome by common sense.

## Create a suitable PR

Expand All @@ -90,7 +87,8 @@ After you open a pull request, you as the author are responsible for resolving:
- Be patient during the review process.
- Don't reopen closed pull requests. If you must create a new pull request, it can reference the closed one.

We are going to do our best to follow [these advices.](https://phauer.com/2018/code-review-guidelines/#code-reviews-guidelines-for-the-reviewer)
We are going to do our best to follow
[these advices.](https://phauer.com/2018/code-review-guidelines/#code-reviews-guidelines-for-the-reviewer)

## PR acceptance criteria

Expand All @@ -113,13 +111,13 @@ We are going to do our best to follow [these advices.](https://phauer.com/2018/c
- Any and all breaking changes have been described in the PR body.
- Any and all deprecations have been described in the code and in the PR body.
- The changes are covered by automated tests (where possible), and those tests cover all relevant edge cases.
- The changes don’t introduce evident regressions nor degrade the software quality in any way. If a
compromise is being done, it has been documented.
- The changes don’t introduce evident regressions nor degrade the software quality in any way. If a compromise is
being done, it has been documented.

## Merging procedures

We prefer signed (and verified) commits and fast-forward merges. On GitHub this requires the CLI, however,
for now, **there are no restrictions** on using merges through the GitHub GUI.
We prefer signed (and verified) commits and fast-forward merges. On GitHub this requires the CLI, however, for now,
**there are no restrictions** on using merges through the GitHub GUI.

The author and the approver should run these commands. The PR on GitHub will close automatically.

Expand Down
Loading

0 comments on commit 7cb1acf

Please sign in to comment.