rails_template_18f 0.8.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +58 -28
- data/README.md +5 -5
- data/Rakefile +12 -0
- data/SECURITY.md +18 -0
- data/lib/generators/rails_template18f/active_storage/active_storage_generator.rb +2 -9
- data/lib/generators/rails_template18f/active_storage/templates/oscal/component-definitions/active_storage/component-definition.json +69 -0
- data/lib/generators/rails_template18f/auditree/auditree_generator.rb +84 -0
- data/lib/generators/rails_template18f/auditree/templates/bin/auditree.tt +29 -0
- data/lib/generators/rails_template18f/auditree/templates/github/actions/auditree-cmd/action.yml.tt +31 -0
- data/lib/generators/rails_template18f/auditree/templates/github/workflows/auditree-validation.yml.tt +42 -0
- data/lib/generators/rails_template18f/circleci/circleci_generator.rb +3 -3
- data/lib/generators/rails_template18f/circleci/templates/bin/ci-server-start +1 -1
- data/lib/generators/rails_template18f/circleci/templates/circleci/config.yml.tt +59 -16
- data/lib/generators/rails_template18f/circleci/templates/docker-compose.ci.yml +1 -0
- data/lib/generators/rails_template18f/circleci/templates/oscal/component-definitions/circleci/component-definition.json.tt +310 -0
- data/lib/generators/rails_template18f/github_actions/github_actions_generator.rb +7 -12
- data/lib/generators/rails_template18f/github_actions/templates/github/actions/setup-languages/action.yml.tt +1 -1
- data/lib/generators/rails_template18f/github_actions/templates/github/actions/setup-project/action.yml.tt +1 -0
- data/lib/generators/rails_template18f/github_actions/templates/github/actions/trestle-cmd/action.yml +20 -0
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/assemble-ssp.yml.tt +26 -0
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/brakeman-analysis.yml +6 -2
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/dependency-scans.yml +4 -4
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-production.yml.tt +14 -25
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/deploy-staging.yml.tt +14 -25
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/owasp-daily-scan.yml.tt +8 -3
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/owasp-scan.yml.tt +4 -3
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/pa11y.yml.tt +6 -2
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/rspec.yml.tt +1 -1
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/terraform-production.yml +20 -58
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/terraform-staging.yml +20 -58
- data/lib/generators/rails_template18f/github_actions/templates/github/workflows/validate-ssp.yml.tt +46 -0
- data/lib/generators/rails_template18f/github_actions/templates/oscal/component-definitions/github_actions/component-definition.json.tt +310 -0
- data/lib/generators/rails_template18f/i18n/i18n_generator.rb +7 -6
- data/lib/generators/rails_template18f/i18n/templates/config/locales/en.yml.tt +1 -0
- data/lib/generators/rails_template18f/i18n/templates/config/locales/es.yml +2 -0
- data/lib/generators/rails_template18f/i18n/templates/config/locales/fr.yml +2 -0
- data/lib/generators/rails_template18f/i18n/templates/config/locales/zh.yml +2 -0
- data/lib/generators/rails_template18f/newrelic/newrelic_generator.rb +2 -37
- data/lib/generators/rails_template18f/newrelic/templates/oscal/component-definitions/newrelic/component-definition.json.tt +113 -0
- data/lib/generators/rails_template18f/oscal/oscal_generator.rb +55 -17
- data/lib/generators/rails_template18f/oscal/templates/bin/trestle.tt +10 -0
- data/lib/generators/rails_template18f/oscal/templates/doc/compliance/oscal/trestle-config.yaml.tt +6 -0
- data/lib/generators/rails_template18f/sidekiq/sidekiq_generator.rb +2 -2
- data/lib/generators/rails_template18f/terraform/templates/terraform/README.md.tt +1 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/production/main.tf.tt +4 -4
- data/lib/generators/rails_template18f/terraform/templates/terraform/production/providers.tf.tt +0 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/staging/main.tf.tt +4 -4
- data/lib/generators/rails_template18f/terraform/templates/terraform/staging/providers.tf.tt +0 -1
- data/lib/rails_template18f/generators/base.rb +9 -24
- data/lib/rails_template18f/generators/pipeline_options.rb +0 -172
- data/lib/rails_template18f/version.rb +1 -1
- data/rails-template-18f.gemspec +6 -6
- data/railsrc +1 -0
- data/railsrc-hotwire +1 -0
- data/template.rb +56 -44
- data/templates/Brewfile +2 -2
- data/templates/README.md.tt +3 -4
- data/templates/app/assets/stylesheets/uswds-components.scss +6 -0
- data/templates/app/assets/stylesheets/uswds-overrides/_index.scss +2 -0
- data/templates/app/assets/stylesheets/uswds-overrides/_override-usa-banner.scss +13 -0
- data/templates/app/assets/stylesheets/uswds-overrides/_override-usa-language-selector.scss +38 -0
- data/templates/app/views/application/_header.html.erb +6 -5
- data/templates/app/views/application/_language_selector.html.erb +35 -0
- data/templates/app/views/application/_usa_banner.html.erb +21 -16
- data/templates/bin/owasp-scan +3 -3
- data/templates/bin/pa11y-scan +1 -1
- data/templates/config/environments/ci.rb +1 -0
- data/templates/manifest.yml.tt +0 -1
- data/templates/pa11y.js +12 -0
- data/templates/pa11yci.js +8 -0
- metadata +35 -16
- data/templates/pa11yci +0 -9
- /data/lib/generators/rails_template18f/circleci/templates/{Dockerfile.tt → Dockerfile.ci.tt} +0 -0
data/template.rb
CHANGED
|
@@ -15,7 +15,7 @@ def skip_active_job?
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def webpack?
|
|
18
|
-
|
|
18
|
+
options[:javascript] == "webpack"
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def hotwire?
|
|
@@ -39,12 +39,14 @@ def print_announcements
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
unless Gem::Dependency.new("rails", "~> 7.
|
|
43
|
-
warn "This template requires Rails 7.
|
|
42
|
+
unless Gem::Dependency.new("rails", "~> 7.1.0").match?("rails", Rails.gem_version)
|
|
43
|
+
warn "This template requires Rails 7.1.x"
|
|
44
44
|
if Gem::Dependency.new("rails", "~> 6.1.0").match?("rails", Rails.gem_version)
|
|
45
|
-
warn "See the rails-6 branch https://github.com/
|
|
46
|
-
elsif Gem::Dependency.new("rails", "~> 7.
|
|
47
|
-
warn "
|
|
45
|
+
warn "See the rails-6 branch https://github.com/gsa-tts/rails-template/tree/rails-6"
|
|
46
|
+
elsif Gem::Dependency.new("rails", "~> 7.0.0").match?("rails", Rails.gem_version)
|
|
47
|
+
warn "See the rails-7.0 branch https://github.com/gsa-tts/rails-template/tree/rails-7.0"
|
|
48
|
+
elsif Gem::Dependency.new("rails", "~> 7.2.0").match?("rails", Rails.gem_version)
|
|
49
|
+
warn "We haven't updated the template for Rails 7.2 yet! Please file an issue so we can get the template updated"
|
|
48
50
|
else
|
|
49
51
|
warn "We didn't recognize the version of Rails you are using: #{Rails.version}"
|
|
50
52
|
end
|
|
@@ -52,21 +54,23 @@ unless Gem::Dependency.new("rails", "~> 7.0.0").match?("rails", Rails.gem_versio
|
|
|
52
54
|
end
|
|
53
55
|
|
|
54
56
|
# ask setup questions
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if
|
|
59
|
-
|
|
57
|
+
compliance_trestle = yes?("Set up docker-trestle integration for Compliance-as-Code? (y/n)")
|
|
58
|
+
compliance_trestle_repo = nil
|
|
59
|
+
compliance_trestle_submodule = compliance_trestle && yes?("Set up compliance documents as a git submodule? (y/n)")
|
|
60
|
+
if compliance_trestle_submodule
|
|
61
|
+
compliance_trestle_repo = ask("What is the git clone address of your compliance document repo?")
|
|
60
62
|
end
|
|
61
|
-
if
|
|
63
|
+
if compliance_trestle_submodule && compliance_trestle_repo.blank?
|
|
62
64
|
register_announcement("OSCAL Documentation", <<~EOM)
|
|
63
|
-
Skipping
|
|
65
|
+
Skipping docker-trestle integration as the compliance document repository was left blank.
|
|
64
66
|
|
|
65
|
-
Re-run the oscal generator after creating your
|
|
67
|
+
Re-run the oscal generator after creating your repo to get started with OSCAL.
|
|
66
68
|
EOM
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
compliance_trestle = false
|
|
70
|
+
compliance_trestle_submodule = false
|
|
69
71
|
end
|
|
72
|
+
# only ask about auditree if we're also using docker-trestle
|
|
73
|
+
auditree = compliance_trestle ? yes?("Run compliance checks with auditree? (y/n)") : false
|
|
70
74
|
|
|
71
75
|
terraform = yes?("Create terraform files for cloud.gov services? (y/n)")
|
|
72
76
|
@cloud_gov_organization = ask("What is your cloud.gov organization name? (Leave blank to fill in later)")
|
|
@@ -103,6 +107,23 @@ register_announcement("Documentation", <<~EOM)
|
|
|
103
107
|
* Review any TBD sections of the README and update where appropriate.
|
|
104
108
|
EOM
|
|
105
109
|
|
|
110
|
+
# do early so later generators register files in the correct location
|
|
111
|
+
if compliance_trestle
|
|
112
|
+
after_bundle do
|
|
113
|
+
generator_arguments = []
|
|
114
|
+
if compliance_trestle_submodule
|
|
115
|
+
generator_arguments << "--oscal_repo=#{compliance_trestle_repo}"
|
|
116
|
+
end
|
|
117
|
+
generate "rails_template18f:oscal", *generator_arguments
|
|
118
|
+
end
|
|
119
|
+
register_announcement("OSCAL Documentation", <<~EOM)
|
|
120
|
+
OSCAL files have been generated with some default implementation statements in `doc/compliance/oscal`
|
|
121
|
+
|
|
122
|
+
All generated statements must be reviewed for accuracy with your system's implementation before being
|
|
123
|
+
submitted for authorization.
|
|
124
|
+
EOM
|
|
125
|
+
end
|
|
126
|
+
|
|
106
127
|
# ensure dependencies are installed
|
|
107
128
|
copy_file "Brewfile"
|
|
108
129
|
insert_into_file "bin/setup", <<EOSETUP, after: /Add necessary setup steps to this file.\n/
|
|
@@ -153,7 +174,8 @@ directory "bin", mode: :preserve
|
|
|
153
174
|
chmod "bin/ops/create_service_account.sh", 0o755
|
|
154
175
|
chmod "bin/ops/destroy_service_account.sh", 0o755
|
|
155
176
|
chmod "bin/ops/set_space_egress.sh", 0o755
|
|
156
|
-
copy_file "
|
|
177
|
+
copy_file "pa11y.js"
|
|
178
|
+
copy_file "pa11yci.js"
|
|
157
179
|
copy_file "editorconfig", ".editorconfig"
|
|
158
180
|
copy_file "zap.conf"
|
|
159
181
|
after_bundle do
|
|
@@ -200,11 +222,11 @@ uncomment_lines csp_initializer, "content_security_policy_nonce"
|
|
|
200
222
|
|
|
201
223
|
# install development & testing gems
|
|
202
224
|
gem_group :development, :test do
|
|
203
|
-
gem "rspec-rails", "~>
|
|
204
|
-
gem "dotenv-rails", "~>
|
|
205
|
-
gem "brakeman", "~>
|
|
225
|
+
gem "rspec-rails", "~> 6.1"
|
|
226
|
+
gem "dotenv-rails", "~> 3.1"
|
|
227
|
+
gem "brakeman", "~> 6.1"
|
|
206
228
|
gem "bundler-audit", "~> 0.9"
|
|
207
|
-
gem "standard", "~> 1.
|
|
229
|
+
gem "standard", "~> 1.36"
|
|
208
230
|
end
|
|
209
231
|
if ENV["RT_DEV"] == "true"
|
|
210
232
|
gem "rails_template_18f", group: :development, path: ENV["PWD"]
|
|
@@ -289,8 +311,10 @@ after_bundle do
|
|
|
289
311
|
end
|
|
290
312
|
directory "app/assets"
|
|
291
313
|
append_to_file "app/assets/stylesheets/application.postcss.css", <<~EOCSS
|
|
292
|
-
@forward "uswds-settings
|
|
293
|
-
@forward "uswds-components
|
|
314
|
+
@forward "uswds-settings";
|
|
315
|
+
@forward "uswds-components";
|
|
316
|
+
|
|
317
|
+
@forward "uswds-overrides";
|
|
294
318
|
EOCSS
|
|
295
319
|
inside "app/assets/stylesheets" do
|
|
296
320
|
File.rename("application.postcss.css", "application.postcss.scss")
|
|
@@ -336,22 +360,6 @@ after_bundle do
|
|
|
336
360
|
generate "rails_template18f:rails_erd"
|
|
337
361
|
end
|
|
338
362
|
|
|
339
|
-
if compliance_template
|
|
340
|
-
after_bundle do
|
|
341
|
-
generator_arguments = [
|
|
342
|
-
"--oscal_repo=#{compliance_template_repo}",
|
|
343
|
-
(compliance_template_submodule ? "--no-detach" : "--detach")
|
|
344
|
-
]
|
|
345
|
-
generate "rails_template18f:oscal", *generator_arguments
|
|
346
|
-
end
|
|
347
|
-
register_announcement("OSCAL Documentation", <<~EOM)
|
|
348
|
-
OSCAL files have been generated with some default implementation statements in `doc/compliance/oscal`
|
|
349
|
-
|
|
350
|
-
All generated statements must be reviewed for accuracy with your system's implementation before being
|
|
351
|
-
submitted for authorization.
|
|
352
|
-
EOM
|
|
353
|
-
end
|
|
354
|
-
|
|
355
363
|
after_bundle do
|
|
356
364
|
# Setup translations
|
|
357
365
|
generate "rails_template18f:i18n", "--languages=#{supported_languages.join(",")}", "--force"
|
|
@@ -452,6 +460,12 @@ if @circleci_pipeline
|
|
|
452
460
|
EOM
|
|
453
461
|
end
|
|
454
462
|
|
|
463
|
+
if auditree
|
|
464
|
+
after_bundle do
|
|
465
|
+
generate "rails_template18f:auditree"
|
|
466
|
+
end
|
|
467
|
+
end
|
|
468
|
+
|
|
455
469
|
# setup production credentials file
|
|
456
470
|
require "rails/generators"
|
|
457
471
|
require "rails/generators/rails/encryption_key_file/encryption_key_file_generator"
|
|
@@ -481,8 +495,7 @@ EOM
|
|
|
481
495
|
# ensure this is the very last step
|
|
482
496
|
after_bundle do
|
|
483
497
|
if run_db_setup
|
|
484
|
-
rails_command "db:
|
|
485
|
-
rails_command "db:migrate"
|
|
498
|
+
rails_command "db:setup"
|
|
486
499
|
end
|
|
487
500
|
|
|
488
501
|
# x86_64-linux is required to install gems on any linux system such as cloud.gov or CI pipelines
|
|
@@ -490,7 +503,6 @@ after_bundle do
|
|
|
490
503
|
|
|
491
504
|
# bring generated code into compliance with standard ruby: https://github.com/testdouble/standard
|
|
492
505
|
gsub_file "config/environments/production.rb", "(STDOUT)", "($stdout)"
|
|
493
|
-
gsub_file "config/puma.rb", /\) { (\S+) }/, ', \1)'
|
|
494
506
|
run "bundle exec standardrb --fix"
|
|
495
507
|
|
|
496
508
|
unless skip_git?
|
|
@@ -500,10 +512,10 @@ after_bundle do
|
|
|
500
512
|
# compliance documentation
|
|
501
513
|
/doc/compliance/
|
|
502
514
|
EOM
|
|
503
|
-
if
|
|
515
|
+
if compliance_trestle_submodule
|
|
504
516
|
inside "doc/compliance/oscal" do
|
|
505
517
|
run "git add -A"
|
|
506
|
-
run "git diff-index --quiet HEAD || git commit -am 'rails-template generated
|
|
518
|
+
run "git diff-index --quiet HEAD || git commit -am 'rails-template generated components'"
|
|
507
519
|
end
|
|
508
520
|
end
|
|
509
521
|
git add: "."
|
data/templates/Brewfile
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Brewfile
|
|
2
2
|
# add any dependencies that must be installed from homebrew here
|
|
3
3
|
|
|
4
|
-
# cloud.gov RDS is on postgres
|
|
5
|
-
brew "postgresql@
|
|
4
|
+
# cloud.gov RDS is on postgres 15
|
|
5
|
+
brew "postgresql@15", link: true
|
|
6
6
|
|
|
7
7
|
# used in bin/with-server script
|
|
8
8
|
brew "dockerize"
|
data/templates/README.md.tt
CHANGED
|
@@ -23,9 +23,8 @@ guide for an introduction to the framework.
|
|
|
23
23
|
* Manually: clicking "allow" when you run the integration tests for the first time and a dialogue opens up
|
|
24
24
|
* Install Ruby dependencies: `bundle install`
|
|
25
25
|
* Install JS dependencies: `yarn install`
|
|
26
|
-
* Create database: `bundle exec rake db:
|
|
27
|
-
* Run
|
|
28
|
-
* Run the server: `bundle exec rails s`
|
|
26
|
+
* Create database and run migrations: `bundle exec rake db:setup`
|
|
27
|
+
* Run the server: `bin/dev`
|
|
29
28
|
* Visit the site: http://localhost:3000
|
|
30
29
|
|
|
31
30
|
### Local Configuration
|
|
@@ -98,7 +97,7 @@ Run everything: `bundle exec rake`
|
|
|
98
97
|
|
|
99
98
|
#### Pa11y Scan
|
|
100
99
|
|
|
101
|
-
When new pages are added to the application, ensure they are added to
|
|
100
|
+
When new pages are added to the application, ensure they are added to `./pa11y.js` so that they can be scanned.
|
|
102
101
|
|
|
103
102
|
### Automatic linting
|
|
104
103
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
@forward "uswds-global";
|
|
2
2
|
@forward "uswds-utilities";
|
|
3
3
|
@forward "uswds-typography";
|
|
4
|
+
@forward "usa-layout-grid";
|
|
4
5
|
@forward "usa-header";
|
|
5
6
|
@forward "usa-banner";
|
|
6
7
|
@forward "usa-section";
|
|
8
|
+
@forward "usa-language-selector";
|
|
7
9
|
// add additional packages here as you use them
|
|
10
|
+
|
|
11
|
+
// or replace these all with
|
|
12
|
+
// @forward "uswds";
|
|
13
|
+
// to import the entirety of uswds
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
.usa-language-container {
|
|
3
|
+
padding: 0.5rem 1rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.usa-language__submenu {
|
|
7
|
+
padding: 20px;
|
|
8
|
+
width: auto;
|
|
9
|
+
border-radius: 3px;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.usa-language__submenu-item {
|
|
14
|
+
padding: 4px 8px;
|
|
15
|
+
|
|
16
|
+
&:last-child {
|
|
17
|
+
border-bottom: 1px solid #dfe1e2;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.switcher-desktop {
|
|
22
|
+
@media (max-width: 800px) {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.switcher-mobile {
|
|
28
|
+
@media (min-width: 800px) {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.usa-language__primary-item:last-of-type .usa-language__submenu {
|
|
34
|
+
[dir="rtl"] & {
|
|
35
|
+
right: unset;
|
|
36
|
+
left: 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<div class="usa-overlay"></div>
|
|
2
2
|
<header class="usa-header usa-header--basic">
|
|
3
|
+
<div class="switcher-mobile">
|
|
4
|
+
<%= render partial: "application/language_selector", locals: {mode: "mobile"} %>
|
|
5
|
+
</div>
|
|
3
6
|
<div class="usa-nav-container">
|
|
4
7
|
<div class="usa-navbar">
|
|
5
8
|
<div class="usa-logo">
|
|
@@ -14,11 +17,9 @@
|
|
|
14
17
|
<%= image_tag "@uswds/uswds/dist/img/usa-icons/close.svg", role: "img", alt: t('shared.header.close') %>
|
|
15
18
|
</button>
|
|
16
19
|
<ul class="usa-nav__primary usa-accordion">
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</li>
|
|
21
|
-
<% end %>
|
|
20
|
+
<li class="usa-nav__primary-item">
|
|
21
|
+
<%= link_to "Example Nav Item", root_path %>
|
|
22
|
+
</li>
|
|
22
23
|
</ul>
|
|
23
24
|
</nav>
|
|
24
25
|
</div>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
<% if I18n.available_locales.count == 2 %>
|
|
3
|
+
<% I18n.available_locales.each do |l| %>
|
|
4
|
+
<% unless active_locale?(l) %>
|
|
5
|
+
<div class="usa-language-container usa-language--small">
|
|
6
|
+
<%= link_to language_span(l), root_path(locale: l), class: "usa-button" %>
|
|
7
|
+
</div>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% end %>
|
|
10
|
+
<% elsif I18n.available_locales.count > 2 %>
|
|
11
|
+
<div class="usa-language-container">
|
|
12
|
+
<ul class="usa-language__primary usa-accordion">
|
|
13
|
+
<li class="usa-language__primary-item">
|
|
14
|
+
<button
|
|
15
|
+
type="button"
|
|
16
|
+
class="usa-button usa-language__link"
|
|
17
|
+
role="button"
|
|
18
|
+
aria-expanded="false"
|
|
19
|
+
aria-controls="language-options-<%= mode %>"
|
|
20
|
+
>
|
|
21
|
+
<%= t "shared.languages.selector" %>
|
|
22
|
+
</button>
|
|
23
|
+
<ul id="language-options-<%= mode %>" class="usa-language__submenu" hidden="true">
|
|
24
|
+
<% I18n.available_locales.each do |l| %>
|
|
25
|
+
<% unless active_locale?(l) %>
|
|
26
|
+
<li class="usa-language__submenu-item">
|
|
27
|
+
<%= link_to content_tag(:strong, language_span(l)), root_path(locale: l) %>
|
|
28
|
+
</li>
|
|
29
|
+
<% end %>
|
|
30
|
+
<% end %>
|
|
31
|
+
</ul>
|
|
32
|
+
</li>
|
|
33
|
+
</ul>
|
|
34
|
+
</div>
|
|
35
|
+
<% end %>
|
|
@@ -4,24 +4,29 @@
|
|
|
4
4
|
<div class="usa-accordion">
|
|
5
5
|
<header class="usa-banner__header">
|
|
6
6
|
<div class="usa-banner__inner">
|
|
7
|
-
<div class="grid-
|
|
8
|
-
|
|
7
|
+
<div class="banner__text-container grid-row">
|
|
8
|
+
<div class="grid-col-auto">
|
|
9
|
+
<%= image_tag "@uswds/uswds/dist/img/us_flag_small.png", alt: t('shared.banner.us_flag'), class: "usa-banner__header-flag" %>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="grid-col-fill tablet:grid-col-auto">
|
|
12
|
+
<p class="usa-banner__header-text">
|
|
13
|
+
<%= t('shared.banner.official_site') %>
|
|
14
|
+
</p>
|
|
15
|
+
<p class="usa-banner__header-action" aria-hidden="true">
|
|
16
|
+
<%= t('shared.banner.how') %>
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
<button
|
|
20
|
+
class="usa-accordion__button usa-banner__button"
|
|
21
|
+
aria-expanded="false"
|
|
22
|
+
aria-controls="gov-banner"
|
|
23
|
+
>
|
|
24
|
+
<span class="usa-banner__button-text"><%= t('shared.banner.how') %></span>
|
|
25
|
+
</button>
|
|
9
26
|
</div>
|
|
10
|
-
<div class="
|
|
11
|
-
|
|
12
|
-
<%= t('shared.banner.official_site') %>
|
|
13
|
-
</p>
|
|
14
|
-
<p class="usa-banner__header-action" aria-hidden="true">
|
|
15
|
-
<%= t('shared.banner.how') %>
|
|
16
|
-
</p>
|
|
27
|
+
<div class="switcher-desktop">
|
|
28
|
+
<%= render partial: "application/language_selector", locals: {mode: "desktop"} %>
|
|
17
29
|
</div>
|
|
18
|
-
<button
|
|
19
|
-
class="usa-accordion__button usa-banner__button"
|
|
20
|
-
aria-expanded="false"
|
|
21
|
-
aria-controls="gov-banner"
|
|
22
|
-
>
|
|
23
|
-
<span class="usa-banner__button-text"><%= t('shared.banner.how') %></span>
|
|
24
|
-
</button>
|
|
25
30
|
</div>
|
|
26
31
|
</header>
|
|
27
32
|
<div class="usa-banner__content usa-accordion__content" id="gov-banner">
|
data/templates/bin/owasp-scan
CHANGED
|
@@ -24,7 +24,7 @@ Notes:
|
|
|
24
24
|
set -e
|
|
25
25
|
|
|
26
26
|
scan="zap-baseline.py"
|
|
27
|
-
|
|
27
|
+
docker_tag="weekly"
|
|
28
28
|
|
|
29
29
|
while getopts "hfs" opt; do
|
|
30
30
|
case "$opt" in
|
|
@@ -32,7 +32,7 @@ while getopts "hfs" opt; do
|
|
|
32
32
|
scan="zap-full-scan.py"
|
|
33
33
|
;;
|
|
34
34
|
s)
|
|
35
|
-
|
|
35
|
+
docker_tag="stable"
|
|
36
36
|
;;
|
|
37
37
|
*)
|
|
38
38
|
echo "$usage"
|
|
@@ -44,6 +44,6 @@ done
|
|
|
44
44
|
|
|
45
45
|
hostname="http://host.docker.internal:3000"
|
|
46
46
|
args="-c zap.conf -I -r zap_report.html"
|
|
47
|
-
cmd="docker run --rm
|
|
47
|
+
cmd="docker run --rm -v $(pwd):/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:$docker_tag $scan -t $hostname $args"
|
|
48
48
|
|
|
49
49
|
`dirname "$0"`/with-server "$cmd"
|
data/templates/bin/pa11y-scan
CHANGED
data/templates/manifest.yml.tt
CHANGED
data/templates/pa11y.js
ADDED