
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
steuer
Advanced tools
A Ruby gem for German tax system utilities, including Steuernummer (tax number) conversion between different formats and validation.
Based on the official specifications from the German Wikipedia page on Steuernummer.
93/815/08152)289381508152)2893081508152)Add this line to your application's Gemfile:
gem 'steuer'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install steuer
require 'steuer'
# Create a tax number object (auto-detects state from unambiguous formats)
tax_number = Steuer.steuernummer('93/815/08152') # Auto-detects Baden-Württemberg
# Check if valid
puts tax_number.valid? # => true
# Get information
puts tax_number.state_code # => "BW"
puts tax_number.state_name # => "Baden-Württemberg"
puts tax_number.format_type # => :standard
# Convert between formats
puts tax_number.to_federal_12 # => "289381508152"
puts tax_number.to_federal_13 # => "2893081508152"
puts tax_number.to_standard # => "93/815/08152"
# ✅ Auto-detects from standard format (each state has unique pattern)
standard = Steuer.steuernummer('181/815/08155') # Auto-detects Bayern
puts standard.state_code # => "BY"
# ✅ Auto-detects from unambiguous federal prefixes
federal_12 = Steuer.steuernummer('289381508152') # Prefix '28' is unique to BW
puts federal_12.state_name # => "Baden-Württemberg"
# ❌ Requires explicit state for ambiguous prefixes
begin
Steuer.steuernummer('304881508155') # Prefix '3' shared by BB, SN, ST
rescue Steuer::UnsupportedStateError => e
puts e.message # => "Cannot determine state from tax number..."
end
# ✅ Works with explicit state for ambiguous cases
ambiguous = Steuer.steuernummer('304881508155', state: 'BB')
puts ambiguous.state_code # => "BB"
✅ Unambiguous prefixes (auto-detected):
28 → Baden-Württemberg9 → Bayern11 → Berlin24 → Bremen22 → Hamburg26 → Hessen23 → Niedersachsen5 → Nordrhein-Westfalen27 → Rheinland-Pfalz1 → Saarland21 → Schleswig-Holstein❌ Ambiguous prefixes (require explicit state):
3 → Brandenburg, Sachsen, or Sachsen-Anhalt4 → Mecklenburg-Vorpommern or Thüringenbegin
# Invalid format
Steuer.steuernummer('invalid')
rescue Steuer::InvalidTaxNumberError => e
puts "Invalid format: #{e.message}"
end
begin
# Unsupported state or undetectable
Steuer.steuernummer('99/999/99999')
rescue Steuer::UnsupportedStateError => e
puts "Unsupported state: #{e.message}"
end
The gem supports all 16 German states (Bundesländer):
| State Code | State Name | Standard Format Example | 12-digit Example | 13-digit Example |
|---|---|---|---|---|
| BW | Baden-Württemberg | 93/815/08152 | 289381508152 | 2893081508152 |
| BY | Bayern | 181/815/08155 | 918181508155 | 9181081508155 |
| BE | Berlin | 21/815/08150 | 112181508150 | 1121081508150 |
| BB | Brandenburg | 048/815/08155 | 304881508155 | 3048081508155 |
| HB | Bremen | 75/815/08152 | 247581508152 | 2475081508152 |
| HH | Hamburg | 02/815/08156 | 220281508156 | 2202081508156 |
| HE | Hessen | 013/815/08153 | 261381508153 | 2613081508153 |
| MV | Mecklenburg-Vorpommern | 79/815/08151 | 407981508151 | 4079081508151 |
| NI | Niedersachsen | 24/815/08151 | 232481508151 | 2324081508151 |
| NW | Nordrhein-Westfalen | 133/8150/8159 | 513381508159 | 5133081508159 |
| RP | Rheinland-Pfalz | 22/815/08154 | 272281508154 | 2722081508154 |
| SL | Saarland | 010/815/08182 | 101081508182 | 1010081508182 |
| SN | Sachsen | 201/815/08156 | 320181508156 | 3201081508156 |
| ST | Sachsen-Anhalt | 101/815/08153 | 310181508153 | 3101081508153 |
| SH | Schleswig-Holstein | 01/815/08155 | 210181508155 | 2101081508155 |
| TH | Thüringen | 151/815/08154 | 415181508154 | 4151081508154 |
Steuer.steuernummer(tax_number, state_code = nil)Creates a new Steuer::Steuernummer object.
Parameters:
tax_number (String): The tax number in any supported formatstate_code (String, optional): The German state code (auto-detected if not provided)Returns: Steuer::Steuernummer instance
Steuer::Steuernummer Methodsvalid? - Returns true if the tax number is validto_federal_12 - Converts to 12-digit unified federal schemeto_federal_13 - Converts to 13-digit electronic transmission formatto_standard - Converts to standard state-specific formatstate_code - Returns the German state code (e.g., "BW")state_name - Returns the full state name (e.g., "Baden-Württemberg")format_type - Returns the detected format (:standard, :federal_12, or :federal_13)original_input - Returns the original input stringAfter checking out the repo, run:
bundle install
To run the tests:
bundle exec rspec
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)This gem is designed to be extensible. Planned features include:
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that steuer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.