Skip to content

Commit 3b8236d

Browse files
Add security requirements
1 parent c63cde1 commit 3b8236d

6 files changed

Lines changed: 66 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Reviews are required by
2+
#
3+
# - @pennylane-hq/fellowship_dependencies_backend
4+
5+
* @pennylane-hq/fellowship_dependencies_backend

.github/RECOMMENDED_CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# It is recommended to receive reviews from
2+
#
3+
# - @pennylane-hq/security as this gem handles the authentication/authorization of users
4+
5+
* @pennylane-hq/security

.github/workflows/test.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,16 @@ jobs:
104104

105105
- name: Run linter
106106
run: bundle exec rubocop
107+
108+
license_checks:
109+
runs-on: ubuntu-latest
110+
steps:
111+
- uses: actions/checkout@v4
112+
- name: Set up Ruby
113+
uses: ruby/setup-ruby@v1
114+
with:
115+
ruby-version: "3.3"
116+
- name: Install gems
117+
run: bundle install
118+
- name: Check licenses
119+
run: bundle exec license_finder
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
exitcode=0
4+
SSH_KEYS_DIR="$HOME"/.ssh/
5+
6+
while IFS= read -r keyfile
7+
do
8+
(grep -l "OPENSSH PRIVATE" "$keyfile" 2>/dev/null | grep -v personal 1>/dev/null 2>&1) || continue
9+
if ssh-keygen -y -P "" -f "$keyfile" 1>/dev/null 2>&1 ; then
10+
echo SSH key with no passphrase: "$keyfile"
11+
exitcode=1
12+
fi
13+
done < <(find "$SSH_KEYS_DIR" -maxdepth 1 -type f 2> /dev/null)
14+
15+
if [ $exitcode == 1 ]; then
16+
cat << EOF
17+
18+
At least one of your SSH keys doesn't have a passphrase. For security reasons,
19+
a passphrase is needed on all non-personal SSH keys. Please refer to the 'Signed commits'
20+
section of the 'Repositories hardening' page on Notion for more information:
21+
https://www.notion.so/scribetech/Repositories-hardening-1cfc3cfcebe842bc88c3ac4fae4a0506
22+
EOF
23+
fi
24+
25+
exit $exitcode

cancancan.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ Gem::Specification.new do |s|
2626
s.add_development_dependency 'rake', '~> 10.1', '>= 10.1.1'
2727
s.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
2828
s.add_development_dependency 'rubocop', '~> 1.31.1'
29+
s.add_development_dependency 'license_finder', '~> 7.2'
2930
end

doc/dependency_decisions.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
- - :permit
3+
- MIT
4+
- :who:
5+
:why:
6+
:versions: []
7+
:when: 2026-05-12 09:52:05.023258000 Z
8+
- - :permit
9+
- ruby
10+
- &1
11+
:who:
12+
:why:
13+
:versions: []
14+
:when: 2026-05-12 09:52:28.040835000 Z
15+
- - :permit
16+
- Simplified BSD
17+
- *1

0 commit comments

Comments
 (0)