rails_template_18f 0.8.2 → 1.0.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 +7 -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/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 +48 -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/pa11y.js +12 -0
- data/templates/pa11yci.js +8 -0
- metadata +31 -16
- data/templates/pa11yci +0 -9
- /data/lib/generators/rails_template18f/circleci/templates/{Dockerfile.tt → Dockerfile.ci.tt} +0 -0
data/rails-template-18f.gemspec
CHANGED
|
@@ -31,12 +31,12 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
|
|
32
32
|
# For more information and examples about making a new gem, checkout our
|
|
33
33
|
# guide at: https://bundler.io/guides/creating_gem.html
|
|
34
|
-
spec.add_dependency "railties", "~> 7.
|
|
35
|
-
spec.add_dependency "activesupport", "~> 7.
|
|
36
|
-
spec.add_dependency "thor", "~> 1.
|
|
37
|
-
spec.add_dependency "colorize", "~>
|
|
34
|
+
spec.add_dependency "railties", "~> 7.1.0"
|
|
35
|
+
spec.add_dependency "activesupport", "~> 7.1.0"
|
|
36
|
+
spec.add_dependency "thor", "~> 1.3"
|
|
37
|
+
spec.add_dependency "colorize", "~> 1.1"
|
|
38
38
|
|
|
39
|
-
spec.add_development_dependency "rspec", "~> 3.
|
|
39
|
+
spec.add_development_dependency "rspec", "~> 3.13"
|
|
40
40
|
spec.add_development_dependency "ammeter", "~> 1.1"
|
|
41
|
-
spec.add_development_dependency "standard", "~> 1.
|
|
41
|
+
spec.add_development_dependency "standard", "~> 1.36"
|
|
42
42
|
end
|
data/railsrc
CHANGED
data/railsrc-hotwire
CHANGED
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,20 +54,20 @@ 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
|
|
70
72
|
|
|
71
73
|
terraform = yes?("Create terraform files for cloud.gov services? (y/n)")
|
|
@@ -103,6 +105,23 @@ register_announcement("Documentation", <<~EOM)
|
|
|
103
105
|
* Review any TBD sections of the README and update where appropriate.
|
|
104
106
|
EOM
|
|
105
107
|
|
|
108
|
+
# do early so later generators register files in the correct location
|
|
109
|
+
if compliance_trestle
|
|
110
|
+
after_bundle do
|
|
111
|
+
generator_arguments = []
|
|
112
|
+
if compliance_trestle_submodule
|
|
113
|
+
generator_arguments << "--oscal_repo=#{compliance_trestle_repo}"
|
|
114
|
+
end
|
|
115
|
+
generate "rails_template18f:oscal", *generator_arguments
|
|
116
|
+
end
|
|
117
|
+
register_announcement("OSCAL Documentation", <<~EOM)
|
|
118
|
+
OSCAL files have been generated with some default implementation statements in `doc/compliance/oscal`
|
|
119
|
+
|
|
120
|
+
All generated statements must be reviewed for accuracy with your system's implementation before being
|
|
121
|
+
submitted for authorization.
|
|
122
|
+
EOM
|
|
123
|
+
end
|
|
124
|
+
|
|
106
125
|
# ensure dependencies are installed
|
|
107
126
|
copy_file "Brewfile"
|
|
108
127
|
insert_into_file "bin/setup", <<EOSETUP, after: /Add necessary setup steps to this file.\n/
|
|
@@ -153,7 +172,8 @@ directory "bin", mode: :preserve
|
|
|
153
172
|
chmod "bin/ops/create_service_account.sh", 0o755
|
|
154
173
|
chmod "bin/ops/destroy_service_account.sh", 0o755
|
|
155
174
|
chmod "bin/ops/set_space_egress.sh", 0o755
|
|
156
|
-
copy_file "
|
|
175
|
+
copy_file "pa11y.js"
|
|
176
|
+
copy_file "pa11yci.js"
|
|
157
177
|
copy_file "editorconfig", ".editorconfig"
|
|
158
178
|
copy_file "zap.conf"
|
|
159
179
|
after_bundle do
|
|
@@ -200,11 +220,11 @@ uncomment_lines csp_initializer, "content_security_policy_nonce"
|
|
|
200
220
|
|
|
201
221
|
# install development & testing gems
|
|
202
222
|
gem_group :development, :test do
|
|
203
|
-
gem "rspec-rails", "~>
|
|
204
|
-
gem "dotenv-rails", "~>
|
|
205
|
-
gem "brakeman", "~>
|
|
223
|
+
gem "rspec-rails", "~> 6.1"
|
|
224
|
+
gem "dotenv-rails", "~> 3.1"
|
|
225
|
+
gem "brakeman", "~> 6.1"
|
|
206
226
|
gem "bundler-audit", "~> 0.9"
|
|
207
|
-
gem "standard", "~> 1.
|
|
227
|
+
gem "standard", "~> 1.36"
|
|
208
228
|
end
|
|
209
229
|
if ENV["RT_DEV"] == "true"
|
|
210
230
|
gem "rails_template_18f", group: :development, path: ENV["PWD"]
|
|
@@ -289,8 +309,10 @@ after_bundle do
|
|
|
289
309
|
end
|
|
290
310
|
directory "app/assets"
|
|
291
311
|
append_to_file "app/assets/stylesheets/application.postcss.css", <<~EOCSS
|
|
292
|
-
@forward "uswds-settings
|
|
293
|
-
@forward "uswds-components
|
|
312
|
+
@forward "uswds-settings";
|
|
313
|
+
@forward "uswds-components";
|
|
314
|
+
|
|
315
|
+
@forward "uswds-overrides";
|
|
294
316
|
EOCSS
|
|
295
317
|
inside "app/assets/stylesheets" do
|
|
296
318
|
File.rename("application.postcss.css", "application.postcss.scss")
|
|
@@ -336,22 +358,6 @@ after_bundle do
|
|
|
336
358
|
generate "rails_template18f:rails_erd"
|
|
337
359
|
end
|
|
338
360
|
|
|
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
361
|
after_bundle do
|
|
356
362
|
# Setup translations
|
|
357
363
|
generate "rails_template18f:i18n", "--languages=#{supported_languages.join(",")}", "--force"
|
|
@@ -481,8 +487,7 @@ EOM
|
|
|
481
487
|
# ensure this is the very last step
|
|
482
488
|
after_bundle do
|
|
483
489
|
if run_db_setup
|
|
484
|
-
rails_command "db:
|
|
485
|
-
rails_command "db:migrate"
|
|
490
|
+
rails_command "db:setup"
|
|
486
491
|
end
|
|
487
492
|
|
|
488
493
|
# x86_64-linux is required to install gems on any linux system such as cloud.gov or CI pipelines
|
|
@@ -490,7 +495,6 @@ after_bundle do
|
|
|
490
495
|
|
|
491
496
|
# bring generated code into compliance with standard ruby: https://github.com/testdouble/standard
|
|
492
497
|
gsub_file "config/environments/production.rb", "(STDOUT)", "($stdout)"
|
|
493
|
-
gsub_file "config/puma.rb", /\) { (\S+) }/, ', \1)'
|
|
494
498
|
run "bundle exec standardrb --fix"
|
|
495
499
|
|
|
496
500
|
unless skip_git?
|
|
@@ -500,10 +504,10 @@ after_bundle do
|
|
|
500
504
|
# compliance documentation
|
|
501
505
|
/doc/compliance/
|
|
502
506
|
EOM
|
|
503
|
-
if
|
|
507
|
+
if compliance_trestle_submodule
|
|
504
508
|
inside "doc/compliance/oscal" do
|
|
505
509
|
run "git add -A"
|
|
506
|
-
run "git diff-index --quiet HEAD || git commit -am 'rails-template generated
|
|
510
|
+
run "git diff-index --quiet HEAD || git commit -am 'rails-template generated components'"
|
|
507
511
|
end
|
|
508
512
|
end
|
|
509
513
|
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/pa11y.js
ADDED